In a remote session, if the computer is left idle for a certain time, you can configure to either disconnect and lock the computer or just disconnect the remote session.