There is a reason that militaries of virtually every country have banned homosexuality for the last several thousand years.
It just does not work in practice.
It may not work in practice, but it does work in secret. And anal and oral sodomy if forced is rape for men and women. I have known two men who were raped. They are both dead. One by suicide after he contracted AIDS from the infected rapist. The other who already had AIDS and begged the rapist not to rape him and spread the disease.