Basically, Microsoft take a Wayland compositor (Weston) and modify it to add support to enable automatic RDP connection to the Windows host. They also added support to RDP individual application window instead of the full desktop. The result is the Wayland compositor will render the application windows over RDP when you run any GUI app.
How
Here is the WSLg repo if you’re curious about how it works: https://github.com/microsoft/wslg
Basically, Microsoft take a Wayland compositor (Weston) and modify it to add support to enable automatic RDP connection to the Windows host. They also added support to RDP individual application window instead of the full desktop. The result is the Wayland compositor will render the application windows over RDP when you run any GUI app.