Static files in public folder fail to render properly, while hugo serve works fine

Opening your site directly from the file system is nonsensical. URLs will be relative to your file system instead of relative to your site.

For the live site, open your browser’s dev tools and look at the console messages:

This is a Cloudflare problem, not a Hugo problem. If I had to guess, I’d say that Cloudflare is modifying the file before serving it which would be make the SRI check fail.

If their auto minify feature is enabled, disable it:
https://developers.cloudflare.com/speed/optimization/content/troubleshooting/disable-auto-minify/

And you may have to purge the Cloudflare cache too:
https://developers.cloudflare.com/cache/how-to/purge-cache/purge-everything