تَأْمُرُ بِالْعُرْفِ وَتَنْتَهِكُ حِمَاهُ
You command what is right while violating its protected bounds yourself.
The same grammatical subject commands virtue and violates its limits. This structural symmetry prevents the addressee from hiding behind the goodness of his own advice: the criticism is aimed at inconsistency.
The rebuke does not make virtuous conduct false because a hypocrite recommends it. It instead distinguishes the truth of a norm from the credibility of the speaker. Effective ethical judgement keeps these two questions separate.