How can I test a custom product page without activating it?

I’m creating a custom product page specific to a product but the only way to view the product in the theme page and test the required actions is to activate it, is there any way to build pages without having to activate the product

Simplest is copy the product to a partner test store though this has the major downside of not having the same apps

For the merchants store,

Add the customizations to the live theme behind feature flags or other conditions( theme.role, shop.domain ,customer tag, Etc) that trigger when you access it in some special way.

The use the unpublished products preview url to test.

I forget if the preview system urls theme role counts as development, or non-main , and work with {% if theme.role == ‘development’ %} or {% if theme.role != ‘main’ %}

Or make sure that product is only accessible on the live front end by a specific customer tag that you log in the front end with(like content-gating,wholesale or membership customization).

Or by an alternate template using the url parameter to work on it (?view=templatename).

Remember to set seo metafield, or robots.txt to avoid the item getting indexed while working on it if need be.

If an enterprise client try a sandbox store to have the same features as a PLUS store (like wholesale, price lists,etc)

Yes it is this much of a clunky poorly documented mess of a workflow to work on prelaunch products.