Some years back, during one of my trips, I kept my passport in the safe in the hotel room; something that I occasionally did during those days. On the last day, I checked out of the hotel, boarded a taxi and headed straight for the airport, all in a swift. Oh dear, after 10 minutes I realised that I didn't have my passport with me. It then dawned upon me that my passport was still in the hotel room's safe. I immediately turned back to the hotel to retrieve my passport. Fortunately, I discovered it early enough. Had I discovered it nearer the airport, I would have certainly missed my flight. The airport is some 45 minutes travelling time from the hotel.
From then onwards, I always make it a point to keep my passport in the pocket of my trousers. Sorry, I don't know what to advise ladies except that putting it in your handbag is not advisable. I also put my passport in a plastic bag first. This is particularly important if you are on a hiking trip. This proved to be the right thing to do during my Mt Fuji trek. It was raining on Mt Fuji and I was completely drenched at the end of the day.
With regards to hotel room safe, try not to put anything in it if you can avoid doing so. This brings to mind another encounter I had with hotel room safe. I had checked into this hotel room and was trying to use the safe. After fiddling with it for a while, I found that there is no way I could not lock it. So I called housekeeping. Shortly, the housekeeper came and she also could not lock it. Then she said, "Don't worry, I will change the safe for you." She then hauled up the safe and lugged it away with her two bare hands. Amazing, isn't! She did bring me another safe which she demonstrated to me could be locked safe and tight. But I was very sure I did not need it anymore. So, the next time you want to use the hotel room safe, make sure it is not one of those mobile ones.