A solution for this problem for me was downgrading to an older version. I used the oldest I could get from https://docs.docker.com/desktop/release-notes/ I went to Docker Desktop 4.24.2 and login works as expected. I can confirm I had login trouble in versions 4.37.2 and 4.38.0. I work on Windows 11 Enterprise.
I had tried signing in using CLI, config.json and some other proposed solutions. Logging in using CLI succeeds in terminal, but that does NOT log me in into the Docker Desktop App.