gnome-screensaver in debug mode like this:
pkill -f gnome-screensaver
/usr/bin/gnome-screensaver --no-daemon --debug &
I noticed this output in the shell when trying to lock
[listener_lock_cb] gs-monitor.c:209 (10:02:48): Locking disabled by the administrator
Which got me to check
$ gsettings get org.gnome.desktop.lockdown disable-lock-screen
This nees to be set to
sudo gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'
Now locking the computer is working normally again for me.