There's a lot Loki could have done, but we're speculating magical causes for real phenomena.
Nobody has spontaneously changed sex like Mizuki IRL but plenty of people have transitioned, and a physiological change isn't neccesary for all this. A change in social role and perception are all that's really needed.
Also, given that Mizuki was always trans, it's not a stretch to try and fit her experiences to RL trans people. He waa just gifted the world's easiest and most complete physical transition.