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: Wickedness plants itself in a man's heart like seeds, and what's in a man's heart inevitably comes out through what he says and does.