using microsoft authenticator I just ran into this recently and searched to find it's a known issue that microsoft has no announced plan of fixing. Strange to see it pop up here separately, I guess it's becoming more common. I knew to cancel the dialogue and manually add the account without the QR code to workaround it but I'm sure plenty of people will have their accounts locked because of this
I need a good authenticator app, I guess. I'm using Microsoft's and have a lot of different stuff in there. I may have run into this already but don't know it.
Try 2FAS - it works without cloud, can import from few other apps (sadly not from Microsoft one) and can export from and import to a file. Works on Android and iOS