Easy, shut the dog out of the room. Or fuck somewhere else, and shut the dog out of the room.
Jeez dude, at least accept that you could have done more, found alternatives. If a dog is running your life, you are part of the reason that is happening. That dog should respect you, respect your commands, and recognize you as pack leader (which it clearly doesn't, if you have to struggle to get alone time from it). If it doesn't, you have no one to blame but yourself.