If you are connected to and logged in to a remote desktop, you can use the Windows Start menu to log off.

You can also log off by tapping the Disconnect button in the floating menu in the remote desktop window and tapping Log Off.

Any unsaved files that are open in the remote desktop are closed during the logoff operation. If you disconnect from a remote desktop without logging off, applications remain open in the remote desktop.