When it comes to proven pedophilia, I don't care who the person is, he or she should be prosecuted to the fullest extent of the law. Their political power and influence should not be a factor to be considered - they are a scourge on humanity. When it comes to draining the swamp, this is the vilest of swamp water.
If a person is a closet gay, I'm somewhat less concerned (although thoroughly disgusted). I've voted in the past for a certain "wide stance" Congressman and later Senator from a very conservative western state. Rumors of his homosexuality were quite well-known and most of us knew that we were probably voting for a closeted gay.
The closeted gay creates an opportunity for blackmail - financially or for political favors. That’s why they are useful (e.g. Hillary picking Tim Kaine).