I have limited information on the implementation to answer, like if you have multiple user pool or same, different app client for each or what is the attributes selected. However one caveat may be if you have enabled login with email or username, this value might toggle based on how user logs in.
Amazon Cognito hosted UI password reset code messageAccepted Answerasked 10 months ago
Cognito Hosted UI user email verification (using valid verification code) failed (according to UI) but user is confirmed.asked 9 months ago
Ability to pre-populate username and password fieldsasked a month ago
Problem with SSOasked 5 months ago
Disable hosted UIasked 5 years ago
Can we make username=sub?Accepted Answer
username property in access_token is different between using SRP_AUTH and hosted UIasked 2 months ago
Cognito pool allows duplicate confirmed email address aliasesasked a year ago
Access key when downloaded as a csv file, doesn't have username field in it, which is needed to configure aws cliasked 4 months ago
How to use preferred username to login a user?