Shopify Liquid Differentiate Taxable Products

Is there any solution, that can help me to Differentiate taxable products?

For Eg: We need to extract only those products from a single collection, which has a variation with taxable without adding any patches with if a condition or contain operator.

What I Tried:

{% for products in collections.all.products | where : 'variants.taxable' : false %}
   ......
{% endfor %}

But didn’t succeed. If anyone has any solution to feature this out. that will be appreciated.

Thanks