I think they could offer a "NA" option for sex so that the person doesn't get counted in sex based rankings at all. I can see that making a TW tick male and everyone seeing it in the results could make them feel unwelcome and is a solution that will make life harder for the volunteers.
Also, everyone could opt in or out of being identified in the rankings, so the "just a fun run" group diluted those that identified as the opposite sex, or those who didn't want their age listed either, for example.
I don't think Parkrun can police everyone to check they are telling the truth, but could look more carefully at record holders, not allow people to change their sex on the records and make it acceptable for race directors to flag up dishonesty for further review.
Their are much better solutions that suit everyone than people losing out so men don't get upset at not being allowed to take things from women.