This happens most at the deeper end, and on strong olive undertones, and it is a range failure rather than a matching failure.
Mix two shades. The most practical solution and genuinely standard practice. Mix on the back of your hand, never in the bottle, so you do not contaminate either product and can adjust the ratio day to day — skin tone shifts slightly with sun exposure through the year.
Shift to a sheerer formula. A sheer tint is far more forgiving of an imperfect shade than a medium-coverage base, because there is less pigment to be wrong. If nothing matches, less pigment is a reasonable answer.
Correct the cast rather than the depth. If your match is right for depth but reads slightly sallow, a yellow corrector is not the answer — but a slightly cooler shade is, and if you cannot find one, a cream blush restores warmth more naturally than a warmer foundation would.
Step up a price point for the range, not the formula. This is the one case where premium pricing buys something scarce, and the deep and rich tones page covers the specific problems — including ashiness from mineral filters — that a better range resolves.
And buy where you can return. It is the single most useful habit in this whole category.