See the question and my original answer on StackOverflow

When you debug, you'll see the error is "0x80070005 : 'Must have a Windows.System.DispatcherQueue on the current thread.'".

This is the same issue as here How to set the acrylic style to window?

WinUI3 has a certain level of independence from Windows. It mainly uses it's own dispatcher queue and has its own composition engine ("Visual Layer") for most work in the Microsoft.* namespaces. But Acrylic & Mica are 100% specific to Windows as they use WinRT's Visual Layer (same as UWP one) in the Windows.* namespaces.

So, you must create a whole shebang to make it work, the official sample is described here Example: Use Mica in a Windows AppSDK/WinUI 3 app (don't forget to choose C++/WinRT in the upper right corner to get the code for C++ not for C#)