If the door opens into the bathroom, replace it with a sliding or pocket door.
In my home, I chose not only a sliding closet door, but also chose a pocket door for coming in and out of the room.
To just add a pocket door does take a bit of work and creates a mess, but the final outcome is worth the inconvenience.
To install a pocket door requires removing the wall where the door will be installed.
The space required for a pocket door should be slightly more than the overall width of the door you are installing.