1.Place 2 commands blocks and active them during the same tick:
/summon ArmorStand ~ ~1 ~
/tp @e[type=ArmorStand,c=1,r=5] @p
It works perfectly, the entity is summoned and teleported to the nearest player.
2.Kill the ArmorStand.
3.Now, add the tag NoGravity to the entity when you summon it.
/summon ArmorStand ~ ~1 ~ {NoGravity:1}
/tp @e[type=ArmorStand,c=1,r=5] @p
The entity is summoned but not teleported.
When you disconect/reconect the game, the entity is teleported to you.
Linked issues
Attachments
Comments 1

Probably a duplicate of MC-67695