I'm using Ubuntu 22.04 and I have connected a monitor to my laptop. After locking, the screen goes blank after 10 seconds which makes the monitor looks empty. So I wanted to keep the lock screen alive so that it can show the time and the wallpaper in the monitor.
I had a similar situation where I wanted to keep the lock screen alive to show off my cool wallpaper in my work system.
All you have to do is simply add this Gnome extension and customize it according to your requirements.