Reproduce the form post on the deployed site, not on a local dev server, and note the exact page URL and form action URL.

Check the configured site URL in the Astro config and compare it with the live deployed domain, including www versus bare domain.

If the app sits behind a proxy or a platform router, check whether the original host and protocol are forwarded to the server.

Redeploy after fixing the config or the proxy forwarding, then submit the form again in a fresh browser session.

Only if the form must accept posts from another origin, disable the built-in origin check in the server config and add your own CSRF token check in the handler.