4 year old help!

bethany

So, my 4 year old daughter has a problem with peeing on herself. What is baffling me, is that she can go weeks without peeing on herself and then out of nowhere starts doing it again. We have tried the rewarding part of giving her a new toy or letting her pick a cake out to make because she went so long without peeing on herself. I know she isn’t doing it for attention, cause she gets plenty of attention. I just do t know what to do. Any advice is appreciated.