Parenting hack for toddlers who lock or close doors

Is

My three years old recently figured out the bathroom lock and would lock himself in. Since removing the door or disable the locks wasn't an option, I have instead hung a small towel on the door, so he can't close it. When grown ups want to use the bathroom, we just remove the towel. You just have to remember to put it back!