How to solve Error: drive.google.com refused to connect?

If you have signed in with multiple gmail accounts in your web browser and try to use any G Suite add-on, you might see this error: drive.google.com refused to connect. Please open an incognito window, sign in with your gmail account used to install the add-on (make sure that you haven't signed in with any other gmail account) and try to use the add-on. It should work.