Looking at Matthew 7:6 specifically:
No one has ever taught or modeled the worth and dignity of every person and the universal command to love all people with the depth, clarity, and urgency of Jesus Christ.
The pig is not ready for the pearl so do not push it on them. Part of love is not just knowing what to say; it’s knowing when to say it and (maybe more importantly) knowing when not to say it.
The idea of pushing pearls on an unreceptive listener can happen in multiple ways; a common way is between or among friends where some believe and some do not.
Now the point of Jesus’ teaching here on the pearl and the pig is not, “Don’t confront.” It’s not, “Don’t set boundaries.” It’s not, “Don’t enforce consequences.” Jesus’ point is don’t force your wisdom on a non-receptive person.