I would either say it upfront or leave open to discovery, because I feel you are probably overly cautious and caring over a minor issue.
Possibly someone has a problem with sharing a room with you discovering you are transgender, but it is much more his or her problem than yours. You definitely own a right not to care his or her comfort.
Within the UK I don’t really think there is any personal safety risk.
I don't think you are any more at risk than, say, someone that snore heavily. Sharing a room implies for everyone a tiny part of risk.