Unity7 and Gnome 3: How to disable "lock was blocked by an application", so that Gnome3 always locks the screen?

To enable screen lock when VirtualBox guest is in full screen, go to VirtualBox Manager -> File -> Preferences -> Input and switch off "Auto Capture Keyboard". enter image description here

Click OK and run guest OS in full screen mode. Screen should auto lock now, and without annoying notification "lock was blocked by application". I'm using Ubuntu 20.04 LTS with VirtualBox 6.1.26.

PS: Is security issue fixed? - Yes, screen lock is working now. Whether usability is lowered? - Yes, a little. This is a kind of trade-off between security and usability. You choose.