There are three different things going on here. There is the physical sex that you were born with. There is the gender that you identify with and there is the sex you are attracted to. And each of those have at least four variants. Male, female, both and neither. So you could be physically male and identify as female and be attracted to women. People who are physically male are on average 30%,+ bigger and stronger than people who are physically female. Someone like that shouldn't be put into a female prison because they are very likely to be a physically dominating rapist.