You don’t see a distinction between statutory rape, which is illegal and has reliable expert evidence of causing harm to others (see below), and being transgender, which is legal and does not harm others?
I think the argument you are making is that social norms vary, and at times age of consent has been younger (without causing harm), and transgender people (and people of color) have been seen as sub-human (and harmful), while today the opposite is true.
Evidence for the harm of statutory rape. I quote one paper that cites unmitigated harm, and a second paper that argues that while enough harm is done to merit having the laws, sentencing and prosecution should take individual circumstances into account:
(1) “It is clear that child and adolescent sexual-assault victims are at risk for a range of negative outcomes, including comorbid PTSD and major depressive episode, comorbid PTSD and substance abuse, eating disorders, delinquency, and revictimization” [Danielson, Carla Kmett, and Melisa M. Holmes. “Adolescent sexual assault: an update of the literature.” Current Opinion in Obstetrics and Gynecology16.5 (2004): 383–388.]
(2) “ In fact, we would agree that it is risky and often enough harmful for young teenagers to engage in sexual intercourse and that a good argument could be made that statutory rape laws need to be retained to protect against and provide punishment for true cases of abuse of young teenagers who are manipulated into engaging in sexual intercourse by older adults who misuse their power and authority.” [Leitenberg, Harold, and Heidi Saltzman. “College women who had sexual intercourse when they were underage minors (13–15): Age of their male partners, relation to current adjustment, and statutory rape implications.” Sexual Abuse 15.2 (2003): 135–147.]