Lin kept quiet after failing sex verification so we don't know the full details, but Khelif was interviewed recently and confirmed having the SRY gene and taking medication to suppress testosterone. The results of Khelif's karyotype testing have also been published, and show XY chromosomes. Excerpts of Khelif's medical file were obtained by an investigative journalist, and show a diagnosis of 5-ARD, which is a disorder of sex development that only affects males. It causes a malformed penis and internal testes, but otherwise normal male development in the rest of the body.
It's the same disorder Caster Semenya has. Semenya is another male athlete who took gold in the female category in the Olympics, for the women's 800m. While two other males took silver and bronze. No trans identity, but the same issue of being mistakenly assigned female at birth and, many years later, having this erroneous birth record used to compete as if female, despite how unfair this was to female athletes.