I'm sorry but I lost interest in matrix in 2017 ish when I tried to use my existing matrix log in when trying to sign into the Mozilla matrix and I simply couldn't. At the end I ended up creating a new account on Mozilla side just so I could use it for a few days.

I've never thought of matrix as a mature technology ever since.

even mastodon figured out federation.

That's not how federation works? You wouldn't log into Mozilla's matrix server with another Matrix server's login, you would just join the :mozilla.org rooms with your normal Matrix account. That's the whole point of federation.

It sounds like you were trying to login to Mozilla's Element web client and it was only set up to authenticate against the Mozilla homeserver but A) that's a client setting unrelated to federation or really the protocol in general and B) not what you were supposed to be doing to begin with.

Mastodon does not have persistence of data though. Your instance shuts down? All your posts are gone. I naively assumed I could just move them to a new instance and found out the hard way. I have felt disillusioned with Mastodon ever since.

Ultimately all things are ephemeral.