Please just go with the flow ( no pun intended) and don't get too upset about this situation. She is not old enough to rationalise, as in, 'if I don't wet my pants everyone's life would be easier'
Something has upset her. Perhaps it is very important that she is dry at night. Too important maybe ? Your words' are after all, ' we are trying to get her to go dry at night ' Perhaps the pressure has been too much.
She can't articulate about what exactly is making her do this as she is not an adult. So as she can't explain succinctly, what she needs is patience and understanding. After all, a few wet pants, what's that?
In exchange for your forbearance she gets over this bit without feeling too much of a failure. She probably will sense your concern.
This phase will pass. Everything passes. I have brought many DCs to adult hood and they made progress in the wee department, then regressed, then made progress. It is utterly normal behaviour.
OR a big deal can be made of her pants wetting, which ends up in her feeling anxious, which then leads to more pants being wet.
You could check that she hasn't got a urine infection as well.
Otherwise, it's really no big deal. Relax and enjoy her.