I’m not sure what you mean. Do you mean that there are conditions under which being sexually attracted to members of the same sex is evolutionarily advantageous?
Or do you mean that the genetic trait that manifests as homosexuality, manifests as another, advantageous, trait under some circumstances? If so, this seems like a version of Darreact’s “imprinting” theory.
Not disadvantageous just means not disadvantageous.