When building / bundling the userscript, the resulting file is pretty bloated because of how big the Zod library is. I found a replacement called Valibot, it seems like a "drop-in" replacement for Zod, and it is advertised as being bundle-friendly.
https://valibot.dev