The Church knows this, but they prefer that silence is golden.
It would seem that in the same manner that a heterosexual priest must put aside his sexual urges, so can a homosexual priest. [And in either case, I am not talking about a sexual predator seeking to molest children].
The bigger question is whether the quality of the pool of priests would improve if the Church allows married priests and/or female priests?