Well...
I just encountered a likely issue which me led to google search and found your question. I realized that @Robert is right when he said, "My guess is that internet connection is necessary for authentication via MS account. For that purpose the MS authentication servers are required as MS has no way to perform a peer-to-peer authentication. As the requirement is that PC and phone have to be in the same Wi-Fi I don't think that screen images are transmitted via cloud (otherwise this requirement wouldn't make sense)"
I started this morning trying to view my phone's screen on my system without internet. The phone link app was already working and showing my apps, messages, notifications, calls, and contacts using the bluetooth but there was no way to view the phone's screen as the system is offline even though they were both connected to the same wifi network. I'd already blocked my PC's access to the internet through the NetLimiter app. Afterwards, I unblocked the internet, it got connected, asked for permission from my phone and the screen came up as expected on my PC!
Now, to troubleshoot the actual challenge...
- I blocked the internet again
- Close the phone cast app and my phone's screen turned back on to show the screen casting has ended.
- Opened the phone's screen again from the PC (without internet remember)
...and everything came up without asking for any permission.
This confirms that the internet connection required in the first instance was to just authenticate the connection with your microsoft account. Moreover, you're always required to connect both your phone and your pc to the same wifi connection.
Hope this helps.