We have RedHat 7.9 workstations running GNOME. We auto-login to the system via /etc/gdm/custom.conf and then we start our app (essentially it acts like a “kiosk”). /etc/dconf/db/local.d/ has our dconf file that has:
[org/gnome/desktop/lockdown]
disable-lock-screen=true
In the old days of RedHat 6.x, we could bring up a Unix terminal and then as a user (not the auto-logged in user), we could launch gnome-screensaver-command -l and lock the screen.
That does not work in RedHat 7.x Is there a different way to do it?
Of course I have not actually tested that on RHEL 7.9, but it works with GNOME 43 and will probably also work in 7.9.
P.S. RHEL 7 maintenance support ends next year, so strongly consider upgrading to RHEL 8 or RHEL 9. Then again, since you were previously on RHEL 6, you must be pretty comfortable with not getting OS updates…