I never punish for potty mistakes....Really never.
I always blame my self. I know that sounds funny, but i always try to back track and think what have i done to change things OR......Your dog could have a UTI. That means they have to go when they have to go. And four hours could be too long for a dog with an UTI or other problem.......Or she could be coming in Season, check if any swelling.
So a vet check could be in order. To check for UTI.
But whatever......when we get potty mistakes we completely ignore what happened, we just clean it up and I try to make a few extra trips out with the dog. every half hour or every hour. When they go outside i really praise again, just like puppies. Start from scratch....
The only time I use "no" is if I actually see them in the middle of it, as they are peeing, as an interrupter. But I just take them outside straight away and praise if they continue outside.
If you make a big deal out of mistakes things can get worse. They do not do it on purpose........Good luck and keep us posted