Hello,
Could you please check whether the same problem occurs when you use a different Microsoft account?
If you are signing in with the same account after a factory reset, Windows may use Microsoft Edge-based functionality to complete the sign-in process. Cached files from a previous sign-in may be preventing you from signing in with that account again.
Please try signing in with another account, or create a new account during setup to see whether you can complete the process.
After setup is complete, you can remove the temporary account and add your preferred Microsoft account to the device.