No, quite the opposite in fact. CPI is a accurate measure of inflation as it tracks how much the real-world consumer prices vary where it really matters: real-world consumer expenses.
Perhaps the mistake you're making is assuming wrongly that demand for specific brands/makes/models is perfectly inelastic and consumers do not change their consumption patterns at all even if their price increases so much that they can no longer afford them. Meanwhile, if a low/middle class family sees the price of stake skyrocket, you can bet they'll start to switch a few meals to hamburguers or hotdogs.
If food gets more expensive and people don't spend more on food then inflation didn't happen by definition. They still spend the exact same amount after all, they just got different food instead.
That’s clearly absurd, and so defining inflation in a way that means it never happens when people substitute goods is also clearly absurd.