GA4 Report Issue for Custom Pixel

I have added the data layer code in Shopify custom pixel to track all e-commerce events through GTM. We use Checkout Extensibility. I was able to create tags, triggers, and variables for Google Analytics 4 (GA4) by seeing the data layer in the browser console section.

Everything is working well but if I go to GA4 and see the Landing Page report then it shows an extra page path with the URLs like my SS.

Is there any solution so the GA4 report shows the landing page properly?

I’m using the code is like below:

You might need to use window instead of document.

analytics.subscribe('page_viewed', (event) => {
  // On every page view, get the current state of the cart
  const windowContext = context.context.window;
  const location = windowContext.location;
  const complete_url = location.href;
  const path = location.pathname;

});

No, the GA4 is still showing the page path and page URL the wrong way like before.