List.FIlterByBooleanMasks have to have the list of elements and the list of Booleans have to match in depth and structure. Yours don’t. This can be fixed by adjusting the lacing on the test (notice you’re using shortest on the of filters, or using a remove list from list node (I believe this is in Rhythm or Clockwork but I can’t confirm as my Revit is busy at the moment) instead of a filter method.
Better yet - your first filter by bool mask has the excluded elements in the out input. Just use that instead and reduce computation time (by halfing the number of calculations).
The string contains lacing should be cross product not longest or shortest. You’re asking if “any of those values are any of these values,” not “is this value that value” 22 consecutive times.
You may need to transpose your list here - if it’s 22 items deep each time no need. If it’s 600+ items deep you’ve missed the boat.
After that you will need to use a list.contains node with longest lacing to find out if any of the sub lists contain true.
That should produce a mask that aligns with your element depth.
Try using List.ContainsItem to check a list recursively for multiple values. You’ll get a boolean mask for each value checked which can be used with FilterByBoolMask with list levels.