My solution, expanded on in greater detail here (https://steveqj.medium.com/the-endangered-art-of-running-like-a-girl-83c636cffdda), would be that trans people compete alongside the gender of their choice, but there records and medals are recorded separately.
It's not a perfect solution by any means, I can argue against it quite effectively myself, but while there are too few trans athletes to form their own leagues, it, or something dreamed up by somebody smarter than me, might have been workable as an interim measure. Instead, now, it's simply a ban.