I am guessing that Rowling would have never considered that. They would probably have to stay in the dorms that match up with the genders on their birth certificates or something :(
^exactly what I had in mind. It would apply for the people who aren't either male or female as knowing J.K. she probably never considered what would happen in that case
It is really sad that someone could feel like an outcast their whole life and be in the wrong dorm being misgendered, and the thing is, you can have this realisation at any point in your life so it just makes it more sad :(