A limitation of Gnome 46 / Ubuntu 24.04
Ubuntu 24.04 comes with Gnome 46, and there is no easy way to install a newer version of Gnome. The built-in "Remote Login" feature of Gnome does not persist if you get disconnected or disconnect from the remote computer. This problem has been fixed in Gnome 47.
Persistent Remote Desktop Sessions
GNOME’s remote desktop support has improved for version 47, with the
addition of persistent remote login sessions. If you happen to be
disconnected from a remote login session, it will now continue, so
that it is possible to log back in and continue from where you left
off, with the system in the same state as when you left it.
Two solutions
1. Upgrade to Ubuntu 24.10
Ubuntu 24.10 comes with Gnome 47. To upgrade to 24.10, open the app Software & Updates and go to the Update tab:
Change the Notify me of new Ubuntu version from "For long term support versions" to For any new version. Click close.
Open the app Software Updater and first complete all the pending updates. Once Ubuntu 24.04 is fully updated, the app may ask you to reboot. Reboot if needed, and open the app again. The app will then offer to upgrade to 24.10:
.
See How to upgrade to Ubuntu 24.10 from 24.04? for detailed step by step upgrade process.
However, Upgrading from Ubuntu 24.04 to 24.10 will take you from long term release (LTR) to short term release. Ubuntu 24.10 is only supported for 9 months, till July 2025. You will have to keep upgrading Ubuntu every six months until you get to 26.04, the next LTR. If you want to remain in the LTR version path, then this is not the solution for you.
2. Install xrdp
xrdp is the "traditional" RDP protocol server for Linux. You can disable "Remote login" in Gnome Settings" and install xrdp with the command:
sudo apt install xrdp
This is a drop-in replacement for Gnome Remote Login. Your RDP client in the local computer should work without any changes in settings.
See the Original Answer for Ubuntu 22.04 section of Ubuntu 22.04 remote desktop headless? for more details.
Hope this helps