Young kids, like at this age and even in Kindergarten, they do not have accurate ability to gauge... their bladder or its fulness.
And, often they are in such a rush to pee, because they want to go back to playing, that they don't even fully, pee completely, or empty their bladder completely. Then they go running off again to play.
Or, they hold it too long.... then by the time they actually do RUSH to the toilet, it may be too late, and a bit of pee is already dribbled in their underwear. Hence an "accident."
And yes, EVEN if they are potty trained.
These scenarios happen, in young kids.
I see it everyday, and at the school where I work. The young kids, have this problem.
Now, when your daughter says she has to go pee, does she really?
Or is it just anxiousness... and her being nervous or something? Some kids get hang ups about going to the bathroom, just in case, type thing. Because, maybe they are always asked that, and it is habit. For example: when my kids are with Grandma or Aunty, they ALWAYS are telling my kids, before going somewhere or doing anything "Did you go to the bathroom? We are not leaving until you do!" type thing. Good grief. So I tell them do NOT do that. Don't give them a hang up about it. They need to know their own bodies and cues etc.
And also, when kids are young, accidents happen. Some kids are self conscious about that.
Then, another thing is, some kids are always asking to go to the bathroom, when in fact they do not HAVE to. They go to the bathroom and just play around. I see it myself. I work at an elementary school.
Then, another thing is: does your daughter do this, only at school... OR does she do it at home, TOO. ie: going to the bathroom many many times a day?
IF she is only doing this at school, then, she can control it.
And it is not a bladder/peeing "problem" entirely. Or at all.
Then, per accidents at school. Is it because she is being told to "hold" it? Now? Kids can't just hold it. They don't know how "long" to hold it etc. before it is acceptable, to the adult. For example. So do you see where it gets confusing for a young child, to be told to "hold it?"
They can't gauge time. Like adults can. Nor can they accurately gauge their bladder or its timing. Even if they had a watch on and could tell time... and they are told to hold it for 1/2 hour more... can they hold it? Or be able to tell how much time has lapsed?
Then, ALL of my daughter's Teachers, from Preschool to Kindergarten to 1st Grade, ALL said, that kids at these ages, HAVE accidents. It is childhood. It does not matter when or at what age the kid was initially potty trained. Kids, have accidents. Even at school or at home or at night. It is childhood. The health room at my kids' school, even has extra clothing for the kids to put on, if they have an accident. And the school staff and teachers, make NO fuss about it. It happens.
No child, is error free or accident free, at these ages.
My daughter, in Preschool and Kindergarten, had a few accidents. So did her classmates. It was NOT unusual. The Teacher was very nice about it, and brought no attention to it nor acting like it was a big deal to the parents.