John: What Dale said. There are occasions when it has happened, but they are more rare purely because of statistical randomness. I wouldn’t count Simon Williams/Wonderman because he’s a distinct character from a different continuity who is similar in name only. But I’m pretty sure there have been stories in DC where Wonder Woman has been changed into a man. And there have probably been short, one off, stories in Marvel where it has happened as well.
The character of Xavin, in Runaways “initially” appeared as a male, but that was only for storyline convenience, s/he was always intended to be fluidly gender swappable as that was sort of the point of the character.
Oh, Cloud, from Defenders… Hey H. Jameel Al Khafiz, can you remember if Cloud started out as male or female? I *feel* like it was a she at first, but I know it has been depicted both ways. But again, like Xavin, that was sort of the point.