How to Disconnect an RDP Session Without Locking the Machine
If your RPA bots are running applications that require the Windows session to remain unlocked, you'll notice that disconnecting from an RDP session into that machine will lock the workstation when you disconnect. To prevent this, create a bat file with the following commands;
tscon %sessionname% /dest:console
Place this on the desktop, and whenever you want to disconnect, simply double-click the bat file. This will end your session without locking the workstation.