It all started here... because I was having this same error.
Hi friend, this week the emails on my sticket stopped and I came across this post, I use business outlook with my own domain, I've already done the step-by-step instructions you gave above:
Downloaded the new build of OAuth2 plugin from the osTicket download page.
Replaced your existing auth-oauth2.phar file with the new one.
You've made these changes in your code.
You've restarted your web server (and PHP-FPM if you're running it) to clear any server-side file caching. If using a hosting provider they will likely have additional file caching and if that’s the case reach out to ask how to clear said cache.
Opened an incognito/private window.
Navigated to your system email in osTicket.
Clicked Remote Mailbox and clicked Config.
Deleted the existing token (if one)......
However, when I log in to the email it redirects to the osticket support home page, the pop does not appear for me to authorize and generate the token,
I'm currently running osticket in a docker with ngix, I've already restarted the container and it has nginx, but I still have the problem.