Over the years we've had some issues with the screen saver activating when we are in full screen mode. This has caused weird focus problems and other issues. Perhaps we should see if there is a way to inhibit the screen saver whilst we are in full screen mode (possibly only whilst also grabbing the keyboard). Some things to look at are xdg-screensaver and XScreenSaverSuspend().
Some bad behaviour are simply bugs in the screensavers. See upstream bug: https://github.com/TigerVNC/tigervnc/issues/1150
*** Bug 7812 has been marked as a duplicate of this bug. ***
https://community.thinlinc.com/t/thinlinc-loses-keyboard-after-screensaver/347/2
If we want to inhibit the screensaver then we can look at how e.g. Chromium does it: https://github.com/chromium/chromium/tree/main/services/device/wake_lock/power_save_blocker