Calling legacy `mono_wasm_invoke_method_ref` on the main thread could lead to GC transition assert at `mono-threads-state-machine.c:807` See https://github.com/dotnet/runtime/issues/89909#issuecomment-1665811281