Well, not all kids.... pee in their diaper because pull ups are a diaper.
Some will even just pee in underwear.
Still.
For me and my 2 kids, I used a potty chair in the room they were in. Kept them naked on the bottom at home. Didn't nag them. And they would "acclimate" to it, in their own time.
My daughter at 2 years old, was ready.
My son at 3 years old, was only sort of... ready.
But with both kids, they potty trained in their own time without much battling. We never had battles with potty training with both my kids.
And it was fine.
I didn't use pee/poop accidents, as a way to leverage them or force them to become... potty trained.
I never used pull-ups. Pull-ups, leak. And they do not hold, much.
My kids were naked on the bottom at home.
With the potty chair nearby them in any room.
At night and per naps of course, they were, in diapers and with a waterproof bed pad, under them.
Sleep and nighttime dryness as you know, occurs much later (even until 7 years old), and is per organ development.
Once my kids... did have more control over their organs... and could "hold" it longer... then, when going out, I would have them in a padded training underwear. And I had a "car potty" in our car, too. And extra clothing in our car. For places that did not have, a toilet. ie: parks.
Everything, occurs in stages. And per the readiness of the child and per, organ/bladder/brain/myelin nerve sheath, development. For, toileting.
And, even if a child is already potty trained for daytime... a child will still have, accidents. It is childhood.
And per all of my daughter's teachers, from Preschool to Kindergarten to 1st grade... kids these ages, have accidents. Still.