I've been trying to fix this issue for over two years now, and finally figured out a solution.
The problem was that I was trying to get Thunderbird to access an Office365 email server using Oauth2 authentication. My password and 2FA code were being accepted find, but I would then hit a popup saying "you can't get there from here" and complaining that my browser was not acceptable. Since I was using Thunderbird to do this, it was rather frustrating. The only solution was to use an old version of Thunderbird which was somehow immune from this problem, but even that stopped working eventually.
The solution was to change the useragent string that Thunderbird was sending for the oauth2 authentication. Thunderbird being Thunderbird, there was an option for this. I just had to go into the config editor and create a new setting
general.useragent.override
and set this to be a blank string. Amazingly, this seemed to do the trick. Maybe it will for you, since I can't find information about this anywhere else on the web.