Besides, Doctor Who has set the precedent in recent years that Time Lords can regenerate into Time Ladies.
Time Lords are a fictional species hailing from a fictional planet on a fictional TV show, and Doctor Who frequently changes the rules of what can and can’t happen on the show.
If that’s not the most polite way “Deal with it!” has ever been said, I don’t know what is.
If the Master could regenerate into a female body, why couldn’t the Doctor?