The teleport command fails when teleporting the player above the y block limit of 20,000,000, but it does not fail when teleporting a player to a destination with a lower height from which the player was teleported, despite still having a destination greater than y = 20,000,000.
Steps to Reproduce:
- Use this command:
/tp @s ~ 19999999 ~
- Fly up until the player is at, or above 20,000,001
- Use this command:
/tp @s ~ ~1 ~
→ The player will get the message "Invalid position for teleport"
- Use this command:
/tp @s ~ ~-1 ~
→ The command will work, despite the destination still having a higher height than 20,000,000