Hello,
Can you please try using VNC software(In place of RDP) to run the tasks on remote server?
With RDP, it is a known issue with any automation software that when you minimize or close the window, it does not work as expected. However, you can do the same thing with VNC. You can keep the VNC session minimized or closed and the automated task would work as expected.
You can find VNC software from the following link:
RealVNC - Download VNC® software
Hope that helps.