For pro sports, I've long thought that they should split it into several divisions depending on your levels of certain hormones, similar to how fighting sports have weight divisions. Natural hormone levels are a huge determining factor in sports even among people of the same birth sex. Maybe they should even allow people to supplement hormones to bring them up to some standard levels for the division. The vast majority of people are basically excluded at birth from ever competing in eg. the Olympics because no matter how high their personal drive/spirit, they just don't have good enough body chemistry, and is that really fair?
If I was in charge of a school and I was required to preserve exactly two divisions for men and women respectively, I'd probably allow transgender athletes to compete where they want, since it's a school, not a pro sports league, and the risk/cost of emotionally harming a transgender student through ostracism seems higher than the risk of a transgender student intentionally cheating the system and completely ruining everyone else's fun. Owners of schools/leagues/property should have the right to set their own policies, though, including dividing it purely along birth-sex lines if they wish. No need for a one-size-fits-all policy, and I oppose government restrictions on private property owners.
Or..
They could be simply recommended mental health counseling..