I doubt the spilled range reference is the problem. Can you post the version of the formula you are using (overwrite the sheet name with something generic if it is sensitive), but try to duplicate as closely as possible what your formula looks like.
Some behind-the-scenes diagnostics might help. Go the the cell with the issue, and in the formula bar, use the cursor selection to highlight this part of the formula:
Excel Formula:
FILTER($P4:$P8,MAP($P$4:$P$8,LAMBDA(r,--(SUBTOTAL(103,r)=1))))
...and then hover the cursor over that highlighting to see a preview of what the returned array looks like, or alternatively, hit F9 to insert that array directly into your formula for closer examination (But do not hit Enter because you don't want to permanently commit/hardwire this array into the formula). Does it appear to be correct? You should see a trimmed down array showing only the visible Charge Codes in the P columns...those that are to be considered in the lookup table. Then hit Esc to revert back to your original formula.
Next, repeat the highlight/selection steps to investigate the array returned by:
Excel Formula:
ISNUMBER(MATCH($B$4:$B$8,FILTER($P4:$P8,MAP($P$4:$P$8,LAMBDA(r,--(SUBTOTAL(103,r)=1)))),0))
You should see an array of TRUE/FALSE and it should reflect which rows in the lookup table have Charge Codes of interest...and any FALSE's should correspond to Charge Codes that are filtered out.
Repeat the examination of:
...does the Primary Criteria array appear to be correct? Any FALSE's should correspond to rows that do not meet the match criteria.
And does
have all numeric values, or is there text or something else non-numeric somewhere in that range?