1. On the remote host open gpedit.msc and Navigate to Local Computer > Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections.
2. Select Automatic reconnection.
3. Change the key's state to "Disabled" and save the settings.