If you are applying for University accommodation, you can choose whether you prefer to live in mixed or single-sex housing. The application form provides an opportunity for you to declare any additional circumstances or special requirements. If you wish to refer to your trans status, you can do so, and the Accommodations Department will work with you to meet your needs. Their staff receives sensitivity training on trans issues.
The webpage explaining provisions for students with special accommodation needs is here. (Note that, although the webpage is worded in such a way that focuses primarily on students with disabilities, the same consideration is afforded to everyone with specific accommodation needs.)
If you apply for mixed-gender housing, and there are not enough spaces available, some people may be automatically allocated to single-gender housing. This will be done according to the gender listed on their student record. If this creates a problem for you, again, the Accommodations Department will help resolve the situation. They are required to adhere to the Equality Act 2010 (which you can read here) and the University’s Statement of Equality Objectives (available here), meaning that the needs of anyone who falls into a protected category will be addressed as a matter of priority.