If a train is due to arrive at 3.30pm, and doesn’t arrive u TIL 3.35pm, it is still classed as late even if it has a wait time of 10 minutes at the station before departure.
In the same way, arriving at 3.35 when school finishes at 3.30 means you were late, @Tessadavies1001. No-one expects every single child to be let out at 3.30pm on the dot - that would involve bending the laws of space and time - but it is NOT unreasonable to expect the parents to turn up at the time school finishes.
Imagine your child had been first in line at the door, and had to watch for 5-10 minutes, while lots of the other children were picked up, and your dd couldn’t see you. You know you were on your way, and would be there (eventually) to collect her, but she didn’t know that - and 10 minutes is a long time at that age - poor mite.
The teacher should not have let your child out if you weren’t there - but if you had been there on time, there would have been no problem! So both the teacher and you need to take some responsibility - and I see no sign of you being willing to do so.
Also, the teacher was right to tell your dd off for going out when she couldn’t see you and hadn’t been told to go by the teacher. Yes, she is only young, but she is old enough to learn this simple rule.