I think you’ve pretty much nailed the use case for the unattended UiPath robot. It doesn’t surprise me at all the closing the connection is killing the process. The user must be logged into the machine for the attended robot to work. I’ve seen a log out or even something as simple as the screen saver becoming active stop an attended robot from working.
Intend for the unattended
Any UiPath project that can be implemented as an unattended robot should be. That’s the whole value proposition of UiPath - to take the human element out of the equation as much as possible.
If you publish UiPath robots to Orhcestrator and run them unattended, you can schedule or trigger them, and they have their own credentials to access and run on the machine in question. So long as the UiPath Assistant is running on the client machine and it can connect to Orchestrator without need for the remote desktop connection, the UiPath process will run and your recurring failures should go away.