This issue occurs when you are either using a sideloading application such as WSA-Sideloader or WSAPacman, or when you try to connect to a device using adb.exe
via Android SDK Platform Tools. This issue arises due to an issue with the inability of Hyper V to reserve port 58526 causing the issue, as seen below.
cannot connect to ||127.0.0.1:58526:|| No connection could be made because the target machine actively refused it. (10061)
This is a bug with the subsystem itself, restarting the PC will usually fix it. But, if you still get this error, try these steps:
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
netsh int ipv4 add excludedportrange protocol=tcp startport=58526 numberofports=1
Hope this works for you!