But what comes out of the mouth proceeds from the heart, and this defiles a person.
Matthew 15:18

Yeshua wasn't contradicting God's instructions about what not to eat. He was using a man-made tradition to illustrate a deeper principle: The words of a man's mouth plant themselves in his heart like seeds and what's in a man's heart inevitably comes out through what he says and does.