here is a work around I found for my particular screen mirroring problem with windows 10.
i have a Roku Ultra LT on the same network as my Acer F17 laptop running windows 10 ver 22H2. I have my Roku connected to the router with an ethernet cable. My laptop is connected to the router wirelessly on the 5ghz bandwidth.
In windows, I see my Roku device listed. When I click on the "connect" feature in windows for screen mirroring, it just gives the message "couldn't connect "
but
If I go to the devices and printers page in windows 10 and a manually add it, it finds it in the search window as a Roku Television, and I select that one and not the one listed as a multimedia device, then it makes the connection directly once it's added.
Each time I want to connect my laptop, I need to remove and re-add the Roku in devices and printers.
Once it's connected, it works great.
Hope this helps anyone who is also troubleshooting this issue.
Notes:
My ipad and iphone screen mirror to my Roku without any problems. The issue in my opinion is how Windows 10 communicates with the Roku device.