Jesus addressed the false worship of this woman. This conversation had nothing to do with her ethnicity! She came to him pretending to know him as “The Son of David”. This was a title she would have had no understanding of since she was not Jewish.
Jesus forced her to think about what her relationship with him really was. It was not as personal as she pretended it to be.
The common distinction of Canaanites was that they were dogs! Jesus is not here perpetuating that racist thinking, instead he was aiming to help her understand how to worship him in truth!