Just because a person, who condemns your sins, is caught in sin, it doesn’t negate yours nor does it make sin any less detestable to God. The only thing that changes is your perception. Your condemner can now be clearly seen as a fellow sinner.
This is the truth for all man. Each man condemns the sins he does not commit, yet distains other men for exposing the ones he does.
You cheer at the folly of the other because, in your eyes, your sin is now somehow less grave than his.
Yet you and he are the same, you just sin differently.
As Christ said, “No one is good except God alone.”