I don’t think it was a consistency-breaking plot hole, simply because I can easily imagine that during the events of ROTJ Anakin would have a conversation about what he hoped for in the future, perhaps after he has failed to become a master and Padme tries to cheer him up:
Padme: "Master or not, I’m sure a member of the Jedi council could tell me."
Anakin: "Tell you what?"
Padme: "Whether it’s a boy or a girl."
Anakin (moving closer and closing his eyes) "It’s a boy."
Padme: (jokingly) "Are you sure? Because I have the strangest feeling that it’s a girl."
Anakin: (earnestly) "No, it’s a boy, and when he’s old enough, he’ll…"
Padme: (sarcastically) "Let me guess. He’ll be a powerful Jedi like his father, and inherit your sword like the great warriors of legend."
Anakin: (sheepishly) "Something like that."
Padme: "So are you saying a girl can’t be a Jedi?"
Anakin: “You know that’s not what I meant.” (senses movement in the other room) "Obi-wan! What are you doing here? Aren’t you supposed to be on Utapau?."
Obi-wan: “I forgot something. Didn’t want to interrupt.”
Unfortunately none of this happened, so the plot hole is created.