AnyViewer is a great tool for you to access remote computer from your local device. In a remote session, to keep the security of the remote PC on the session end, you can check Lock the device when disconnected option. Once the option is enabled, the remote PC will be locked automatically on the session end.

Lock Device

Note:  This option is only available for assigned devices and is suitable for remote control of your own devices.