I had a very similar problem when changing the domain of my wordpress install in a local dev environment. I realized after-the-fact that changing the domain within the admin UI is simply not sufficient. Even after fixing all occurrences of the the old domain name in the database I was still having trouble with the login redirect.
I know it was accepting the password as an explicit attempt to use the wrong password produced an error. A correct login produced the following url in my browser:
wp-login.php?redirect_to=https://mydomain/wp-admin/
Rather than the redirect_to attribute working, the page just re-rendered the login form. Aside from accessing the admin UI, everything about my install appeared to be working.
It turns out simply opening up wp-config.php and updating the constant DOMAIN_CURRENT_SITE
was all it took to fix this error. I hope this helps anyone else struggling to troubleshoot problems with changing their domain.