Normally the drivers of wi-fi is set in "automatic band selection mode for 2.4Ghz/5Ghz" and sometime for bugs of chipset makers Miracast is not working properely.
Try the following configuration of your Wi-fi adapter card that help to fix this isue. This optimization works only on some wi-fi adapter that support the "preferred band" function.
Go to Windows Settings -> Networking & Internet
Select WiFi Adapter -> Right Click -> Properties
If available -> Choose 2.4GHz as preferred Band and save configuration
Windows Settings -> Home -> System -> Projecting to this PC
Go to Windows Settings -> Home -> System -> Power & Sleep