This question already has an answer here:
My 13 month old dog started peeing in the house again after being house trained. He would only do it at night (when I was asleep) or when I would go out. At first it seemed just like an accident, but when it started happening more consistently (even when walked immediately before bed or right before I left) I switched to crate training.
He's been mostly fine with the crate, though he does sometimes get stressed in there. After a month, I decided to try seeing if the habit was broken. I left him alone in the house (not in the crate) for about 20 minutes to run an errand, and when I got back he had peed 3 times.
If he's only peeing in the house when I'm not there to catch him, how do I correct the behavior? Or should I just continue to leave him in his crate? He doesn't have this problem when I'm home (and awake), even if he's unsupervised or if it's been a while since his last walk.
I don't have access to comment, so to answer your question, Jeremy, I don't know if he has peed in the house while left alone with others. I live alone, so if he's home with someone it's usually me. My sister dogsat for him one weekend, and he definitely peed while I was gone, though she said she didn't see him do it (it might have been overnight or when she was out as well).