Accidents happens.
They are learning.
It takes time. Sometimes a long time.
All kids, even if they are already potty trained and older, WILL have accidents. Guaranteed.
It is childhood.
Don't work on keeping her pants dry. That is not the priority here.
The priority is, her getting on the potty.
Keep her naked on the bottom for now.
We did that with our son.
Then in time, once they get more cued about it themselves, then you transition to padded underwear. I used the "Potty Scotty" underwear for my son.
It takes time.
Lots of time.
Each step, is singular. Not all at one time.
Little steps at a time.
She will not get it until she is ready.
It is about physiological/biological development and the brain connections too. Not just the child's age.
OH and also know that: even if potty trained, night time/nap time dryness is entirely different. Night time/nap time dryness is not something fully attained, Biologically, until even 7 years old. And this is normal.
Still use a diaper at night time. The child will NOT get confused. My kids NEVER got confused, by it.