The site is built using output: "export" in the Next.js config and hosted on Cloudflare.
The issue is that right after a new build is deployed, the first client-side navigation between routes triggers a full page reload instead of working as an SPA. However, after this initial reload, further navigations behave correctly without reloading.
What could be the reason for this issue, and how can it be solved?