I trained my 4yo daughter by waking her up in the middle of night, and bring her to toilet to pee, at first it's a struggle but after a while she'll get used to it and she will learned either to wake us up when she wants to pee or hold the pee until morning
Sallly