Did you find out your cousin was gay through 23 and me or from him?
Non-heterosexual behaviour can be observed in most social amniotes, even those without fingerprints. Genetically-identical twins do not have identical sexual proclivities. There's no a priori reason to believe there's even a "gay gene" to find.
So at most a perfect genetic test could give a percentage chance of someone being gay/straight.
I guess that's pretty much what you said.