I don't have a "this is for sure the answer", just a possibility from a web search, that seemed possibly to fit your description. Maybe these are set low, or not set at all, and you may want to try updating the values? (on the Win11 target, I presume).
https://superuser.com/questions/201695/what-is-the-registry-key-to-terminate-sessions-on-disconnect
specifically, this reply:
Under HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
, add these DWORD values:
MaxDisconnectionTime
MaxIdleTime
If set to 60000 (milliseconds), the time-outs will be one minute.
Full registry key file:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]
"MaxDisconnectionTime"=dword:0000EA60
"MaxIdleTime"=dword:0000EA60