How to prevent certain products being added to other collections?

Hi all,

I have a requirement to create dynamic products using Shopify API for each product in the store. These products should not be visible in any collections of the store. To achieve that, I tried adding a new rule to each merchant’s collection: Product vendor should not be “my-widget”.

This solution works fine if the merchant has enabled “all conditions”. But it leads to undesired side-effects, if “any condition” is enabled. It includes all the products in the store where the vendor is not “my-widget”.

I’m not able to find a solution if the “any condition” is enabled. Can someone please help me resolve this?

Thank you.