Global GameRules Mod 1.18.2/1.16.5/1.12.2 will allow global GameRules to work when you load a world. Check its features here to learn much more about its benefits!

About Global GameRules
It is a release that lets global GameRules apply once loading a world.
Besides, it will reveal the world’s difficulty when it’s loaded and locking of the difficulty.
If locking a difficulty, it’s impossible to unlock again. It’s complete after any strain changes.
Every difference for the GameRules or the difficulty in one realm is appliable to all other maps. It happens if loading and saving them to the config.
Changes in either config file or in-game config GUI are workable on world loads.
For 1.15.2, Config in Minecraft is not active in forge yet. Hence, it’s essential to edit everything in the config file. You can reset the file without restarting the game. What you should do is to reload the world/edit when in the main menu.
Global GameRules is a miscellaneous mod. It requires Minecraft Forge!
Screenshots