When using the spawnpoint command in command blocks or functions - after death/entering the end portal you are not sent to your spawnpoint and receive the message "Your home bed was missing or obstructed". Screenshots attached, tested on singleplayer and multiplayer servers
You’re placing the spawnpoint IN the command block, a command block in your feet is not a valid spawn location.