After a recent update, I believe related to KB4578013, KB4580358 (possibly KB4580469 or KB4566468), when closing a remote desktop session (clicking X only, not logging off), all apps that were running are automatically closed. It seems the session is automatically logged off. Even though a message box pops up when closing a session saying apps will remain running. However it seems the logoff is being done regardless. This never used to be the case before the updates above were applied.