This issue is typically caused by XFCE's screensaver package which activates after a period of time and then doesn't accept input from a connected RealVNC Viewer to end the screensaver, thus causing the session to appear to be frozen.
A quick way to resolve this is to remove the xfce4-screensaver package. This can be achieved by running the appropriate command for your platform (below), and then starting a new Virtual Mode session.
sudo apt remove xfce4-screensaver # Ubuntu
sudo yum remove xfce4-screensaver # Redhat/CentOS
On some distributions, you may need to remove the light-locker package instead:
sudo apt remove light-locker # Ubuntu
sudo yum remove light-locker # Redhat/CentOS