We had a domain.onmicrosoft.com with a couple of users but one had firstname.lastname@example.org as their user.
We then synced our on-prem server with Azure AD, so we had a local user which matched this by email. What it did was rename the on-prem user to email@example.com only on the Azure side. We deleted the domain.onmicrosoft.com account so we could assign the original username/email to this account but it will not let us change it back.
There is no writeback to on-prem so locally its all okay.
If we go to edit online - the "User Principal Name" box is greyed out.