Keeping the litter box in a separate room can be an effective way to prevent dogs from accessing it. Choose a quiet room where the dog rarely goes and ensure easy access for the cat. Using a door wedge or a cat door can allow the cat to enter and exit the room while keeping the dog out. Placing a sign on the door can remind others to keep it closed, maintaining the privacy and safety of the litter box.