Kindly remove and re-add the custom domain on the new Static Web App. This often clears any stale bindings and triggers a fresh propagation across Azure's edge network.
Steps to follow:
Go to the Azure Portal > Your new Static Web App >Custom domains.
Select and remove the affected custom domain.
Click Add > Choose Custom domain on other DNS (or the appropriate option) > Enter your domain and complete the validation (usually via TXT record).
Once validation shows as successful, wait 15–30 minutes for edge propagation, then test thoroughly.
If the intermittent 404s continue after re-validation and waiting ~2 hour, please reply with your Subscription ID, the name of the new Static Web App, and a screenshot of the Custom domains blade to provide to MS Support team
Reference Documents :
https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain
https://learn.microsoft.com/en-us/troubleshoot/azure/app-service/connection-issues-with-ssl-or-tls/troubleshoot-custom-domain-issues-azure-app-service