Quick note:
You can get a similar effect of a pet following you by using one of these guides:
and setting the repeater task interval to be double the item decay in the zone.
Advantages are it is more memory efficient, and you don’t need one text device/item image/prop for every coordinate.
Disadvantages are that the item could be picked up, and you can only use items for pets.
(also the zone has to be as large as your map, and there will be item decay)
(this gif is a bit low-quality)