If you try to run command when the server start exists a period where any command (help, list, whitelist) just throw “An unexpected error occurred trying to execute that command” with the flag VERBOSE_COMMAND_ERRORS looks like the issue is a check for gamerules when the ServerLevel can be null on start.
Steps
Start the server
When show “Starting net.minecraft.server.Main” just try any command (help, list)
Expected Behaviour
The server run the command
Current Behaviour
The server throw an error with not details
Please log into the game and run these commands, and see if an error occurs there. Please attach the server log which shows these errors.