Is there a way to get all products including unlisted in a collection?

Now I get the products in a collection using this:

{% assign collection = collections[handle] %}

{% paginate collection.products by 50 %}

But this way doesn’t include the unlisted products. Therefore, I have to work around using the all_products:

all_products[handle]

But the all_products object can only support 20 unique handles per page.

If the page has more than 20 products, we can’t show the extra products. Is there any way to show all products, including unlisted products, in a collection?

No, thats the whole point of unlisted, it isn’t surfaced on storefront.

Exactly as Luke said.

What’s your use case for displaying unlisted products? If you need to, you can use a collection metafield that references the unlisted products. Check out the docs on working with unlisted products for more info: Unlisted product status