We have one user account on the remote server. When computer A initiates a remote session, then disconnects from it, and computer B initiates a remote connection, computer B is being connected to the A’s session.
How can I make sure that only the same device can reconnect to its remote session?
If it’s a single user account I don’t think you can. You need to make sure that they log off instead of disconnecting, then they can start a new session with the right account.
See here for more info.