Zend certified PHP/Magento developer

xubuntu in hyper-v freezes keyboard and mouse clicks after some idle time

Usually I’m using virutalbox, but as there are supposedly some performance issues if one runs virtualbox together with WSL2 I decided to try out Hyper-V.
I have virtually no experience, so perhaps there is something obvious which I’m doing wrong.

I installed Xubuntu 20.04 on hyper-v on a windows 10 machine.
The machine also runs WSL2 though I’m not sure it matters as the problem also shows up if all WSL entities are terminated.

The machine works perfectly in graphical mode and I installed openssh-server and can also connect to the VM.

After some idle time, the graphical interface shows some strange behavior.

I can still see the display.
When I move the mouse cursor over the screen I see (depending on the cursor position) the cursor shape change, but neither mouse clicks nor keyboard presses are handled anymore.

On the other hand connecting via ssh is still working.
When trying to use x11vnc to connec tot he screen I observe exactly the same issue, that
mouse clicks and keyboard presses are ignored, but the cursor is still moving.

I disabled the screen saver as I thought perhaps it creates some strange side effects, but it changed nothing.