As mentioned in my comment, there are two options available under config|System:
1. Desktop Sharing
To use this, you have to be logged into the remote machine already. You will then connect to that session and when you disconnect, you can re-connect later and continue where you left off.
2. Remote Login
This creates a new session each time you connect. When you disconnect, the session is ended. This is similar to logging into a remove shell using ssh. When you disconnect, that session end.
These are my observations of how these two implementations were done. It would be nice to have to the option to use "remote login" and keep the session active on disconnect and maybe there is a way. Please share of you know how and I'll update my answer.
3. Ubuntu 24.10
Update: It seems that Ubuntu 24.10 allows the session to be resumed. It's a Gnome feature that wasn't ready yet for 24.04.