My dogs have never done this but I usually keep the bathroom door closed which solves any potential problem. Gosh I can't believe a dog died from that, that is so sad. Better keep your trash up!