It is possible to run scripts without actually logging into windows. Top of mind it is called silent or stealth mode.
But, this only works if yo don’t actually have to start applications and perform actions that require user interface actions.
When you run attended/studio(x) scripts it is by default in UI mode, but unattended not per se…
I think in the current community condition it is this setting:
from your project → settings
The flag “Starts in Background”. Different Studio Versions might have it named different;ly though, I don’t recall (and have no access to my enterprise studio from here)
I’m not sure if this is the actual cause of your problem, but it is at least something to verify and rule out.