The reason you’re facing this issue is the last user to remote into machine locks the desktop which prevents the tool from connecting hence it doesn't work, you can make it work by either using a Run bot runner session in the control room ( although this will require a lot of configuration changes that you’ll have to make referring the automation anywhere documentation based on the version of the tool you are using) or you can create a batch file each time you log off your system.
Are you interested in learning RPA from the basics! Here's the right video for you on RPA provided by Intellipaat: