How to run pyautogui in my remote desktop window

Not able to run my pyautogui script in my remote desktop when disconnected or minimised .It’s possible if I am in my remote desktop.any suggestions on how to run it even if RDP is disconnected?