Custom domain issue with NextJs 404 error + Cloudflare pages

Getting 404 on several JS/CSS resources on Custom domain. However, pages.dev works fine.

Hello there, sorry to read that you are experiencing difficulties.

Could you share the steps to replicate these 404s on Custom domain?