Screenshot is basically half the screen when it is taken with the screen is locked

You shouldn’t be running automations with the screen locked. The automations need an active desktop to be able to interact with. If the automation doesn’t need human interaction, you should be running it unattended.