I understand that your Lab Services template VM became inaccessible while installing a VM inside Hyper-V.
I followed the same process and installed Hyper-V and then an Ubuntu VM inside Hyper-V but did not face the same issue with losing RDP connectivity. I recommend selecting the Troubleshoot and then redeploying the virtual machine to see if that resolves your access issue. When you redeploy a lab VM, Azure Lab Services will shut down the VM, move the VM to a new node in within the Azure infrastructure, and then power it back on.
If you are still facing issues, I recommend recreating the template VM. If the issue is reproducible please give me the steps you are following and the OS that is being installed so I can investigate further.
Hope this helps. Let me know if you have any more questions and I will do my best to assist.
Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.