All the worlds I have tested it in are new worlds created with the datapack enabled before generation in 1.16 pre 5. I have yet to test it in pre 6. The spreadplayers command works properly when running the function manually through chat but not when run automatically through the tick function.
Edit: Just tested it in pre 6 and the issue is still there, new worlds, issue exists regardless if the datapack was added before or after world generation.
Edit 2: Here is the specific command if that helps
execute as @a[scores={nthst=10}] run spreadplayers 0 0 0 256 under 100 true @s
Thanks for the clarification. I assumed that using the execute command as a player through a function would run the command in the dimension that player was in. Instead it always runs in the overworld regardless of where that player is (unless I use at @s)