Using the /data command I cannot attach a leash to an entity. To reproduce:
Summon a sheep (or any other entity, afaict)
/data modify entity @n[type=sheep] leash set from entity @s UUID
It will say the data was modified, but no leash appears. If attach the leash manually, and run /data get entity @n[type=sheep] leash
, it shows my UUID. But the above command doesn’t set that value (a /data get command returns “Found no…”).
Try leash.UUID instead of leash.