I would argue the exact opposite: Linux is great, but it wasn't really designed with a focus on containing hostile software, and while containers have come to be a
decent security barrier, they're still one kernel bug away from compromise. On the other hand, the browser is very accustomed to being
the most exposed security-sensitive software on a machine, and modern browsers and wasm in particular are designed against that threat. Heck, wasm is so good for security that Mozilla started compiling components to wasm and then
back into native code to get memory safety (
https://hacks.mozilla.org/2020/02/securing-firefox-with-weba... ).