Hm, when testing this on my end the Function node let’s all 10 items pass:
So I suspect the problem lies with the static data of your workflow used in your Function code.
So to avoid trouble here and to simplify debugging (which is very painful with static workflow data as it won’t work when manually executing your workflow), you might want to consider alternative approach for your deduplication. I’ve shared a possible approach using Grist (a spreadsheet/database) combination here:
The example was built for an RSS feed of course, but you should be able to adjust it to your needs. You wouldn’t need to worry about the loop and probably use the ID field from your API data to avoid duplicates.