I think it's reasonable enough to segregate competitive sports, not by gender but by chromosomal makeup.
Except in occasional one-off stunts, people don't footrace against dogs or horses. We don't weight lift against gorillas or freestyle swim against herring. We can say "of course not, those are separate species." But they also have different chromosomal makeup. Men and women are not separate species, but they do have different chromosomal makeup.
That said, though it might be reasonable to segregate sports that way, it's not always necessary and should not be done when it's not necessary, such as only for reasons of tradition or prudery.
One "sports entertainment" or quasi sport, American Ninja Warrior, has it right. Or about as right as it's possible to get, as far as I can tell.
It's an annual obstacle course competition with up to six rounds, each round a different course (though with some overlap in specific obstacles from course to course). Everyone who completes the course (in one individual try) gets to go on to the next round; everyone else is out, see you next year. There is an exception for rounds 1 and 2 only, that a specific number of competitors (180 and 90 respectively, 30 and 15 per regional competition venue) go on to the next round. In theory that could mean some competitors who complete a course might not get to go through if the allotted number of other competitors completed the course in a faster time. In practice that's never happened; what happens instead is that some competitors who didn't complete the entire course but were among competitors who got the farthest in the course before failing get to go through anyhow.
Women and men compete on the same courses under the same rules. There is an exception: from round 1 to round 2, the 30 women (5 per region) who performed the best are always allowed to go on to round 2; and from round 2 to round 3, 12 women (the top 2 per region) always go on. In the past couple of years, roughly half the women who have gone on to rounds 2 and 3 would have gone on anyway, based on their performance, if the special rule had not been in effect. (Also note that the special best-women slots are not a limit on the number of women who can move on based on athletic performance alone. If twenty women finished in the top thirty during a regional first round, they would all go through, along with ten men, and the slots designated for women would become irrelevant.)
The result is that even though there are more men than women competing, and few of the women make it to the most difficult final rounds, the woman competitors get a large share of the attention along the way, and the top women competitors are as well known to the audience as the top men are. This is possible because:
1. No one gets a bye. Every competitor every year starts in round 1, alongside the rookies and the hopefuls and the oddballs and the inspiring-overcomers-of-life-obstacles-just-to-be-there. Elite competitors can and occasionally do fail on the first obstacle. (In most sports we've developed the bad habit of watching only the most elite competitors in the most exclusive competitions.)
2. The focus is always on the round at hand. The talented hopefuls who hang tough and grit their way through the first round on the ragged edge of disaster (and quite a few of the women competitors fall into this category) are as celebrated in the moment as the elites who (usually, but not always) breeze through. And they're the most interesting to watch. Even the inspiring overcomers (the old guys, the cancer survivors, the less than fully abled, the doing-it-for-recently-departed-loved-ones, etc.) are cheered for every obstacle they reach or pass. And when one of them gets through the whole round, which does happen often enough in early rounds, it's a fully celebrated victory in the moment, undiluted by commentary about how they might measure up to the top competitors.
3. Because of the survivors-move-on format, most of the time is spent on the early rounds where there are the largest number of competitors. A season's broadcasts consist of six episodes of round 1, six of round 2, and then two episodes that take the final survivors through the "finals course" of rounds 3, 4, 5, and 6. Thus, even though no woman has made it past round 4 (aka "stage two of the finals course"), only a tiny fraction of the men ever do either. Since the final rounds have few surviving competitors and take little time, woman competitors are represented in every broadcast.
4. It's not a "real" sport. That is to say, the competitive effort is quite real, but what the audience watches is highly manipulated for entertainment value. (Much like every other televised sport, but in somewhat different ways.) The competitions are not shown live. There are not even real fan spectators. (Instead, friends and family and associates of the competitors, who are more tolerant of the real-time tedium of e.g. resetting the course for each competitor, form the "crowd.") And the producers decide who gets to enter each year. These and other unreality elements can be, and are, used to avoid disadvantaging the prominence and attention of women in the competition. For instance, not crowding out the top and middle-tier women competitors with numerous available middle-tier men, as would likely happen if entry were based entirely on athletic merit.
With the producers' ability to select competitors for audience interest, and the increasing number of women in training for the sport, they're probably looking forward to the allocated slots becoming unnecessary in a few more years.
So, what will the producers do the first time a biologically male trans competitor asks to compete and then expects to be eligible for one of the slots reserved for women? Probably, let her; it'll be interesting and they're always looking for interesting. And the second time? "No thanks, one's enough for the time being."
I could go on... I think there's more that could be learned from this example, but hopefully you get the idea. I watch ANW in large part because it's exciting seeing the women competitors gradually achieve more and more success at feats that seem hardly humanly possible to begin with.
We could get rid of the idea that the only competition worth watching is between equally matched elite competitors. As long as there's no safety hazard created (such as, for instance, by an unequal match in a combat sport) the notion that an elite competitor is being dishonored, or a lesser competitor is being humiliated, by being in the same competition with one another is misguided. There's this thing called sportsmanship (though we might need to rename it) that should take care of that issue.