I have occurred this issue when using `runCommand` to run `scoreboard` or `say`, too, whether on `Dimension` nor `Player`. My world has cheats enabled, and I can run them directly in game, but not through a script. I'm not sure if this is an issue with my script or the engine itself.
When I run `overworld.runCommand("say something")` at the root, it works, but I get an error when running it in other contexts. I haven't been able to find a simple way to reproduce the issue, so I will continue testing.
Minecraft version: beta 1.20.10.21
Module version: 1.4.0-beta
I just found the reason why they do indeed throw errors in certain environments. It's worth noting that the reason is actually written in the documentation, which states "This function can't be called in read-only mode."
To solve this issue, please refer to Bedrock Wiki.