Wasn't Edwin turned into a woman as a curse? And then certain characters (Cernd, if I recall correctly?) would make fun of him? Revising that as an identity discovery journey seems to me like the attempts to rewrite Grencia from Cowboy Bebop who was a man that was cruelly experimented upon into a "trans" character in the recent reboot...

...Which is all fun and games (being sarcastic here) when you limit it to media franchises, but since we are touching real-world subjects at this point, it also evokes the recent trend of "transing" historical figures - for the most part powerful and influential women, apparently, because you cannot be powerful and influential and display stereotypically (by someone's standards) masculine traits and affinities and a, gasp, woman according to the oh-so-progressive views on gender these days. I suppose the fact that I am not exactly a fan of it all (hence my poorly veiled displeasure at the addition in BG3) is somewhat apparent by now.

Anyway, as for the girdle of masculinity/femininity question raised above, I guess one can assume that it would revert a hormonally imbalanced/DSD-afflicted male into a hormonally imbalanced/DSD-afflicted female. Basically, a femboy will turn into a bearded lady and vice versa, or something along those lines, or one mutation will be replaced with another. It's probably easier to just cast Polymorph Self or get willingly transformed into a hermaphrodite (with more of a masculine build, though) of an illithid at that point. We could also tackle the spontaneous polymorphs that wild magic introduces - BG1: EE had the wild mage mentor character in Neera's questline who mentions that without wild magic he "would have never experienced the joy of being a woman". Which sounds a little fetishistic (probably unintetionally, or meant to be humorous (remember when we had humour? Been a while, it feels like), as it was written prior to Beamdog going all out with Siege of Dragonspear and BG2:EE...) and hits somewhat close to home with the current views on the whole debacle.