The automatically locking screen not works

When Virtualbox guest OS is running and the window is active, host OS (leap 15.4 with kDE) disables automatically locking screen, how can I keep it working no matter what is running?

@emots:

Maybe this will help – <https://wiki.archlinux.org/title/KDE#Lock_the_screen_before_suspending_and_hibernating>

This is a VB issue and not related to Opensuse https://forums.virtualbox.org/viewtopic.php?f=7&t=92640

If using XFCE instead, it can solve the automatically lock problem, but KDE looks pretty.

When xscreensaver is running as the main locker of desktop environment, the screen can be automatically locked. it shipped with XFCE, IceWM, etc, but how I to run it in KDE?

Hi,
If you open the system settings in power management,
go to activity power settings
You have to enable the use “separate settings” then enable suspend sessions and choose lock screen.
Don’t forget to edit the time it will automatically lock the screen.

not work at all, even disable the lock setting Workspace Behavior.