Pee can leak out of diapers for several reasons.
Sometimes a diaper may be too big or too small and cause the diaper to not absorb or seal good enough around the babies or toddlers legs.
If the diaper is too large and sagging then the leg gathers of the diaper cannot seal properly which can cause a leak around the leg gatherings and cause pee to leak down your child's leg.
My 2 year old cousin pees a lot and sometimes he'll leak out the leg gathers of his diaper and pee will run down his leg.
That happened to him a few days ago when he was sitting on my lap and I noticed his pants and even my pants getting wet.
He was peeing really bad and the diaper could not absorb fast enough and with him sitting down compressing the diaper the pee ran out of the sides of the diaper.
His diaper was fitting properly and it only happened when he sat down.
That's normal as if the kid is peeing too fast and all at once the diaper cannot absorb the pee fast enough and when he's sitting down the diaper is compressed which also allows the pee to run out the leg gathers.
Also if the diaper is too small then the diaper won't be able to seal around the waist and legs properly so it can easily leak out pee.
Or you may need to get a more absorbent diaper for your child.
Some babies and kids pee faster into their diapers and are heavy wetters and no matter how good the diaper is it still may leak from time to time.
You might try adding a pair of plastic pants over the diaper or double diapering your kid by cutting a slit into the front of the first diaper and putting another diaper on over the first diaper.
Or you can buy booster pads for diapers that help increase the diapers absorbency.