What strange times we live in.
The simplest solution is to go back to XX and XY parameters to determine which team a person is allowed on.
A far more cumbersome system could be worked out, with some success. I used to race sailboats. There are literally dozens of boat brands and many custom one-off racing yachts. Those wanting to race each other hundreds of years ago faced a similar dilemma. How to determine that a sailor's skill won the race and not the boat design? One solution was to insist of identical boats, made by a single vendor, and there are lots of races of that type every summer.
But another solution was to take ANY boat and give it a "handicap." The engineers would carefully measure dozens of key parameters and after running lots of calculations they would determine how fast it should be in theory. Then that boat could race against other, completely different, boats, and after adjusting the finish times based on handicap the winner could be declared.
So if a male wants to compete against a female, great. But his finish time will have to be adjusted in order to be "fair." To fail to do this is to deny logic.
In this past week, a male Penn swimmer is winning everything? The female competitors should simply refuse to leave the starting block. Otherwise, what's the point?