Damn, you ported this over to MonoGame on a web browser? How'd you do it?
The monogame folks have been working on WebASM support for a few years and released a working template last week. I rebuilt my existing monogame game against this new version.
See: https://community.monogame.net/t/timeline-for-mono-aot-webassembly-export/12548/...