When using the setworldspawn command and dying, the player will spawn at random locations near the coordinates the command was set, instead of the exact location the command was set.
I set the world spawn at the coordinates 33, 33, 26 but instead it spawned me at 36, 33, 25.
in other occasions, it spawns me nearer, or farther away, never spawning at the exact coordinates.
Use
/gamerule spawnRadius
to control this