Hi there,
"The Desktop Window Manager has exited with code (0xd00002fe)" indicates that the RDP connection was disconnected and not that the user ended it using logoff.
The reason you might get this error is that you might be using a newer version of the remote desktop than what the remote computer is using to connect regardless of any authentication process, set your remote desktop client to connect even if there is no authentication.
On Remote Desktop go to Options then click on the Advanced tab and under “if the actual verification does not meet minimum policy requirements” choose Connect and don’t warn me.
Below threads discusses the same issue and you can try out some troubleshooting steps from this and see if that helps you to sort the Issue.
--If the reply is helpful, please Upvote and Accept it as an answer–