Altean culture is very different when it comes to gender. It’s widely accepted there that gender is fluid. So as soon as Allura is able to vocalize it;she’s a girl. No questions asked. They have a renaming ceremony so she can have a name that suits her true gender. Everyone celebrates their beautiful princess, no one mourns the loss of the prince that never existed.
This is why Allura is so confused when she hears Pidge is a girl. It’s unheard of on Altea to hide your gender she says “are you sure” because she thinks that if Pidge were a girl she would simply say so.