Hey, I just solved the issue; hopefully this is an option for you. I linked my old Microsoft account with my Mojang account which you can do by logging onto minecraft.net and updating your profile, and now I just sign in with the Microsoft account and all my Mojang info was transferred to it. Realms, worlds, everything is there now.
I'm having this exact same issue. The strange part is I can log in on my Microsoft account (from my old Xbox days) but the Mojang account I actually use for Minecraft doesn't work.
Hey, I just solved the issue; hopefully this is an option for you. I linked my old Microsoft account with my Mojang account which you can do by logging onto minecraft.net and updating your profile, and now I just sign in with the Microsoft account and all my Mojang info was transferred to it. Realms, worlds, everything is there now.
Hope that helps.