Your DD has a problem, and you need to get to grips with helping her. Saying she 'shouldn't be doing this' and that you're worried about 'what the teacher must think of us' is completely unhelpful. Sorry if that sounds unsympathetic.
My DD was like this last year in Reception (age 4/5).
I did some research. First, I contacted ERIC (an incontinence charity) and followed all their advice and information.
The problem still persisted. I did more research and went to my GP to get a referral to a private consultant - a paediatrics urologist. After six months of seeing his clinic, she was 'cured'.
First, he put her on a daily sachet of Movicol. I didn't think she was constipated, but it turned out that she was. Long term mild constipation can remove the ability of the brain to 'feel' the signal of a full bladder. Because there is always a sensation of pressure coming from the bowel/bladder region, the young brain learns to block it out. Hence, DD was just wetting herself regularly (several times a day).
Next, he sent us to his clinic where a nurse did 'bladder retraining' biofeedback. DD was hooked up to a computer, with sensors stuck on her skin around her tummy and perineum. Then she played video games which required her to squeeze and relax her pelvic floor muscles - she could see the results instantly on the screen (e.g. a fish 'leaping' to the surface or dropping to the ocean floor). She loved these sessions.
The nurse also gave us careful instructions to follow at home. For example, DD had to drink a lot of fluids (which seemed counter intuitive) - because it is easier to begin recognising the sensations of a very full bladder.
After about eight weeks of weekly sessions DD had improved a little. The sessions stopped, but we kept up the drinking/toileting etc. routine that the nurse had set up. Within 2 to 3 months, she had almost completely stopped wetting herself.
Now in the autumn term of Y1 DD has wet herself twice at school in the whole term - whereas in the summer term of R, it was at least twice a day!
You can Google 'biofeedback' bladder retraining and see if there's someone near you. It is not cheap, each session was about £200 (and the consultant appointments were about £150). But if it's an option then I would highly recommend it - but only after you've exhausted the resources of ERIC and any local NHS incontinence clinics.