Hi
We have a 10 year old rescue dog who is fully and reliably housetrained. She is not allowed upstairs, but will sneak up when she can. The problem is if she gets on the beds she will often pee on them. She doesn't pee anywhere else. She knows she isn't allowed on the beds so I do wonder if she does it in shock when she is discovered, but we don't shout at her etc. so she certainly isn't scared of us. She doesn't do it when caught doing other things. We've taken her to the vet and there are no issues that they can find. We got a new mattress and we thought that might help as there is no dog smell, but she peed on the new one. She's just peed in DD's bed for the first time. We use the deodorizing spray but it makes no difference. She has always been impervious to any of the sprays supposed to deter dogs. Apart from this issue she is well-behaved. She was a rescue dog and used to be extremely anxious, but this has improved hugely over the years, and she is now happy and settled.
Other than keeping the bedroom doors closed (which we obviously try to do, but there are occasionally lapses) is there anything else we can do? It's becoming a real problem. It's when we are in the house with her - we keep her in the kitchen when we are out.