Instead of having boys and girls teams, just transform them to XX and XY teams.
Problem solved.
Would work for bathrooms too.
99% of the kids wouldn’t be able to figure out which bathroom to go to.