Is Leaf's existence even canon in the games?? And no, the trainers' hats don't mean anything IMO.
You clearly underestimate the power of a nice hat.
And no, not in-game canon. Rumor and artwork suggest she was cut during development due to time constraints. The real reason is that she had no nice hat. Hence, why she was cut. --- All above is completely true and accurate, unless it isn't.
I think it mostly depends on your head-canon whether the female or male is canon, as you can play as either character without anything being told about that. The only exception could be Red, because he appears on later games, rather than Leaf. And yes, Hilda and Rosa appear at the Multi Battle Subway as an NPC partner. Whatever...So, who has the best hat? --- I hate everything.