This behavior hasn't really changed though. I think you've been using the wrong command(s) and are now discovering the results of that.
For example:
/spawnpoint @p means that you'd set the spawnpoint for the
nearest player. So unless the command blocks were actually at that same location where the players got teleported to then this wouldn't work right. It could also glitch if there are multiple players involved.
So.. on 1.12.2 I'd do something like this:
- /scoreboard players tag @p add totp
- /tp @a[tag=totp] 10 64 10
- /spawnpoint @a[tag=totp]
- /scoreboard players tag @a[tag=totp] remove totp
I'd probably set the teleport command into a repeating command block and then place
conditional chain command blocks behind it. The scoreboard tag command can then be used to initiate the transfer.
But like I said: 1.13 hasn't changed anything here. Well, apart from an easier to use tag command, and fo course: you can no longer use a slash in a command block:
- tag @p add totp
- tp @a[tag=totp] 10 64 10
- spawnpoint @a[tag=totp]
- tag @a[tag=totp] remove totp
Same as before: use the tp command in a repeating command block and place
conditional chain command blocks behind it.
However... You could also consider to use a function, that is probably a whole lot cleaner and it is much less prone to errors. 1.13 makes that especially easy with using datapacks.
So, for example, create a function which contains only this:
tp @s 10 64 10
spawnpoint @s
Then, at the location where you want to initiate the teleport, use a regular command block which uses this:
execute as @p run function yourserver:game/tp-player
This would imply a namespace "yourserver" in the datapack which contains a folder 'game' and the file "tp-player.mcfunction" in it.
So basically: datapacks/yourdatapackfolder/data/yourserver/functions/game/tp-player.mcfunction.
Hope this helps.