GNOME Shell Extension: Allow locked Remote Desktop
You will need a GNOME Shell extension to solve this problem.
First, install install gnome-shell-extension-manager with this command:
sudo apt install gnome-shell-extension-manager
Then, open the newly installed app called Extension in the GUI. Within this app, search for and install the Allow locked Remote Desktop GNOME Shell extension.
Now you will be able to remotely connect to this computer even when the screen is locked. You will still need to be logged in locally first.