Compare actual spending with what the volume actually sold would have cost at budgeted costs. That separates the volume effect from the change in unit cost.
An example with numbers
You budgeted to sell 100 units with an $8 variable cost, $800 in total. You sold 120 with an actual total cost of $1,020. At actual volume, the flexible budget would be $960. Of the extra $220, $160 is explained by volume and $60 by a higher unit cost.
Try it with your numbers
Rebuild your flexible budget before calling the extra spending an overrun. Keep separate the fixed costs that do not vary with those units.
This calculator is on its way. In the meantime, you can do the calculation on paper or in a spreadsheet.
Example figures for learning purposes. They are not a recommendation and do not replace professional advice.