A few hours ago I filed
MC-210408, which detailed an issue with /spawnpoint in regards to coordinates that are out of bounds. Turns out /setworldspawn is also affected by a similar issue. If a player sets the world border out of bounds, the game will instantly crash.
To reproduce it, all you have to do is do /setworldspawn ~3000000000 ~ ~ in-game.