Install the necessary software:
apt install gnome-remote-desktop freerdp2-wayland winpr-utils
Enable via GUI (Recommended for most users) Open Settings from the system menu (top-right corner).  Go to Sharing in the sidebar.  Toggle on Remote Desktop. 
Configure the Username and Password (these can be different from your system account).  Ensure Remote Control is enabled to allow full interaction.  ⚠️ Note: If the first connection fails, restart the service:
systemctl –user restart gnome-remote-desktop.service
try headless:
sudo grdctl –headless
open the rdp port in the firewall:
sudo ufw allow 3389/tcp
Reload the firewall to apply changes:
sudo ufw reload
Disable screenlock disconnect:
gsettings set org.gnome.desktop.session idle-delay 0
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
disable login lockout:
sudo apt install gnome-shell-extension-manager
Open Extension Manager and install “Allow Locked Remote Desktop”.
Start the remote desktop:
sudo systemctl enable –now gnome-remote-desktop.service