Hello @Jerry Shou
As you have stated that Microsoft's DMFT sample code is not Working on windows 11 it might most probably be an OS bug or the environment that you have created might be different for Windows 10 and Windows 11.
Have you tried to figure out the error log in the windows log and trace it in the event viewer to identify the source?
The best way would be to raise feedback to the Microsoft team as it seems to be an issue only with Windows 11. The Feedback Hub app lets you tell Microsoft about any problems you run into https://support.microsoft.com/en-us/windows/send-feedback-to-microsoft-with-the-feedback-hub-app-f59187f8-8739-22d6-ba93-f66612949332
Hope this resolves your Query!!
--
--If the reply is helpful, please Upvote and Accept it as an answer–