I've stayed in a hotel where the toilet door was made of glass, and had big gaps. I was staying with an acquaintance, so things were really awkward. It didn't help that the shower was right in front of this frosted glass, so the person's entire silhouette was very visible when showering.
Another time, in Amsterdam, I stayed at an AirBnB where the toilet was on the balcony, and had a glass door (non-frosted) in the kitchen. Yep, if you needed to go, and someone was cooking, or was a neighbour, they were looking right at you.