My Page works in preview but not in live published Site!

My site: https://www.usafree.com.tw/
My Corvid Code on my product page:
https://www.usafree.com.tw/product-page/mk5739

import wixData from ‘wix-data’;
import wixStores from ‘wix-stores’;
$w.onReady( function () {
loadProducts();
$w(“#ProductPageGallery”).show();
});
async function loadProducts() {
let product = await $w(‘#productPage5’).getProduct();
let FilterBool = await ProductFilter(product);
let ShowGalleryBool = await showGallery();
console.log(FilterBool);
console.log(ShowGalleryBool);
}
async function ProductFilter(product) {
let ProductName = product.name;
console.log(ProductName);
$w(“#ProductModelDataset”).setFilter( wixData.filter()
.contains(“title”,ProductName)
)
.then( () => {
console.log(“Dataset is now filtered”);
} )
. catch ( (err) => {
console.log(err);
} );

return true ;
}
async function showGallery() {
$w(‘#ProductPageGallery’).expand()
.then( () => {
console.log(“Done with Gallery Expand!”);
} );
let isGalleryRendered = $w(“#ProductPageGallery”).rendered;
let isGalleryVisible = $w(“#ProductPageGallery”).isVisible;
console.log(isGalleryRendered);
console.log(isGalleryVisible);
return true ;
}

Make sure you sync your sandbox (Preview) database with the Live:

Thanks a lot! It worked! Hope my code above can help others also!