Right but to be fair none of your issue makes sense if you are following the documentation. Make sure you are using official package of v1.17.2 from our website. Make sure you are using the latest build of the OAuth2 plugin. Try going to the database and delete the relevant ost_email_account records matching the email_id of the email having issues. Then you can go in and reconfigure modern auth.
Cheers.