🔍 See Original Answer on Ask Ubuntu 🔗
Windows move between workspaces when screen turns off
August 30, 2018
November 24, 2022
Copy to clipboard: false
There is a four year old bug report on this and the fix is in and it’s been triaged:
Windows change Monitor/Desktop after screen lock
In the short term instead of locking the screen on inactivity (which basically shuts it off with gnome-screensaver I think) you could consider a screen saver with password that kicks in after a period of inactivity. I haven’t tested this myself mind you.