I believe this is because it executes using the account set as the default in your browser when you are signed into multiple accounts. I ran into a similar issue, and it work by using another browser signed in only to the account that I used to create the script. Typically the account you login to first is set as the default automatically and you don't have control over switching the default account. You would have to sign out of all accounts and sign in to the account you want to be the default first.