We see in this a spiritual rebuke of a person who is slipping away from God. A backslider who is helped back to God will thank you for it later.
Someone who flatters with the tongue and says everything is okay can do you great harm. Flattery has no value but reproof does, so it leads to gratitude.
Truth is always the best rule.