The first Google account that you log into in the browser is the default account, and that default account is given a number of zero. Then when you log into subsequent accounts, they are numbered with the next number. The account number is often put somewhere into the URL in the address bar.
For example, in Gmail:
https://mail.google.com/mail/u/0/#inbox - Default account
https://mail.google.com/mail/u/1/#inbox - Second account logged into
So, if you see a single digit number somewhere in the URL in the address bar, that may be the account associated with the account sequence that you logged in with. That is, if that app can detect multiple accounts and which one is associated with the current tab.
Unfortunately, Google Add-ons and the Apps Script code editor don't seem to be able to detect what account is associated with their browser tab.
In other words, the code editor and add-ons don't "know" what account to use.
This has been an ongoing issue for a long time.
If you want to be logged into multiple accounts, and still have the code editor work, then I'd log out of all accounts, and then the first account that you log back in to must be the account that you want the code editor to work with. And if you want the code editor to work with multiple accounts that you are logged into, I'm not sure if that is possible.
You can edit the URL in the address bar and change the account number at the end of the URL, but I don't think that the script URL has anything in the URL to indicate what account it's associated with.
If I'm wrong about something, or someone has better, more information please let us all know.