@xsweetmex It's probably because in ancient China, both male and women had long hair, so that doesn't help, and so the principal difference is how they dress and whether the wear make-up or not, and also the way they style up their hair. Heroine dressed up herself and her hairstyle as a man, and doesn't wear any make-up, so they think not any further than she's a male. I think however, that it isn't a law as I rarely saw anyone being offusqued by the fact a girl dressed as a male, merely being surprised by the fact they weren't what they thougt. She probably also changed the way she adresses herself, but that's not something we can see reflected in the translation (tell if I'm wrong, chinese speakers).
Apart from that, I see a delicious way to return his punishment by throwing herself at him like he's her (his) lover, indicating to the public that the prince himself is gay... How sweet a revenge that would be... But I don't know if it will happen.