Trans is a mental state yes? Wtf does it matter who plays the person? Can only bipolar people play bipolar? Can only anorexics play anorexic?
Well, for the second, only a normal-weight anorexic can be played by a normal actor, other than that, no idea; an actual half-starved anorexic should be in a clinic, not acting in a movie, but I don't think making a healthy actor starve so they fit the role would be ethical.
But yes, trans is a mental state, and if you don't want to portray someone who has actually taken hormones or had surgery in visible places (in which case the only adequate choice of actor would be a trans one) then a person of the same sex as the fictional character is exactly the right one.