All product pages resulting 404 error after duplicating the theme

Hi,

Clearpay (aka Afterpay) gave me their messaging snippet code to add to the theme. liquid to show their onsite messaging. Before I touched the code I created a duplicate of the original, then edited the duplicated one, after adding the code and opening the product page it was showing a 404 error for all product pages. I deleted the duplicated theme and went back to the original and it is fine and back to normal.

Then I created a duplicate from that original (which was untouched and is still working fine), but how many times I create a duplicate theme, the product pages are resulting in a 404 error. I’m not sure what exactly is happening!

Obviously, it’s a theme outside of Shopify so they said they can’t help, and I’m not sure why it’s happening. Does anyone have any clue? is this a glitch? because literally the theme is working and when duplicated all product pages are showing a 404 error.