To work around this issue, you can enable the Configure keep-alive connection interval policy in the Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections group policy folder. If you enable this policy, you must enter a keep-alive interval. The keep-alive interval determines how often, in minutes, the server checks the session state.
This issue can also be fixed by reconfiguring your authentication and configuration settings. You can reconfigure these settings at either the server level or by using group policy objects (GPOs). Here's how to reconfigure your settings: Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Security group policy folder.
- On the RD Session Host server, open Remote Desktop Session Host Configuration.
- Under Connections, right-click the name of the connection, then select Properties.
- In the Properties dialog box for the connection, on the General tab, in Security layer, select a security method.
- Go to Encryption level and select the level you want. You can select Low, Client Compatible, High, or FIPS Compliant.
Here is the link for your reference https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/troubleshoot/rdp-client-disconnects-cannot-reconnect-same-session
----------
--If the reply is helpful, please Upvote and Accept as answer--