OP you know your child. Leaving a 5 year old upset isn't teaching resilience in my opinion. Helping them to be happy and confident walking in rather than pretending not to find it hard is what my aim would be. I'm surprised the school aren't offering any support if it's happening a lot :(
I would ask the teacher for (or if you can pop in after school one day and take yourself) pictures of the school gate, something on the route from that to the classroom, the door she goes in, her peg, the classroom door and a photo of her smiley teacher. Make a visual story and print it out:
"now I am a big girl in year 1 I can go into school all on my own! First I go through the gate, mummy has to stay there and she always waves at me until I go around the corner!
Here's the door I go in through, it's big and red!
I hang up my coat on my peg, look it has my name and a cat picture on it!
here's my teacher, she's always so pleased to see me in the morning"
then read it with her and look at it with her a lot.
Some children find having a little heart drawn on their wrist that you have put there that they can touch when they feel unsure helps, it's a link to you. Others a little soft toy keyring on their bag. My child and I both have keyrings that look the same and if he's not happy on the walk in we swap them over so he has one that's full of mummy cuddles to take in with him. No one knows about it and it reassures him when he thinks he might get sad (he never needs it that I know of, but knowing he has it really helps him go in)
I also find distraction really helps - I can't come past the gate, can you see if you can hop all the way to the corner, I'll watch you! can you go and look round the corner and sign to me how many birds you can see in the tree? can you see if you can find a cool leaf to take in to show your teacher? get her to pick what you'll do after school when you pick her up as you're getting close, so she's thinking nice things and can't dwell on how sad she'll be to say bye.
I think the rule in itself isn't silly as such, but it does make things harder for some kids who struggle with some transitions, I think it's having the leaving you transition and the going into school one both at the same time.