I think the issue might be in the last node of the subworkflow, the Code node specifically in its mode and how it handles the input items,
There are three inputs to that node, and from the attached image, it seems that only the middle path is being executed.
I don’t have the full picture of your logic,
but to make sure you’re getting the data you actually expect,
try adding a Set node after the last node (Code node) in the subworkflow, Then check whether it returns the values you expect or nothing..
