Just implemented this: https://www.leonsitblog.com/2020/01/resolving-wifi-display-connection.html This Fix was what resolved the issue. (in my case I had not enabled security baseline yet as my windows 10 devices worked fine but windows 11 devices did not) In case the link above gets removed or the website removes itself. This is the below fix:
Needed to create a Firewall exclusion and configured a new profile in the following manner;
- Navigate to Devices > Windows
- Select Configuration Profiles and then Create Profile
- Enter a suitable name, select Windows 10 and later for the platform and then Endpoint protection for the profile type
- Navigate to Microsoft Defender Firewall under the Firewall rules heading select Add Populate the settings based on the Wireless Display (TCP-In) Firewall rule
The profile should then be deployed to your devices enabling you to connect to Wi-Fi displays once more.