Update: The issue has been resolved after changing my Microsoft account password.My previous password was not wrong. I could sign in successfully with that password through a web browser and on mobile, and I could also complete two-step verification. However, Windows 11 OOBE kept failing when I tried to use that same password during setup.
After I changed my Microsoft account password, Windows Setup/OOBE accepted the account normally and the setup continued successfully. This seems very unusual, but changing the password fixed the OOBE sign-in issue.