Given a trader llama and a wandering trader (I use them with NoAI to keep them from wandering off, which I don't think is relevant), I get the trader's UUID as an array with
/data get entity 1234.... UUID
(using completion to get the trader's target UUID). This gives me a four int array, which I copy from the log. I then paste it into the following command (again using completion to fill in the trader llama's UUID for the entity target):
/data modify entity 5678... leash.UUID set value [I; 1234... ]
... and the trader llama is destroyed, it goes away. This works fine with other animals I've tried, just tender llamas.
I've seen MC-258553, but things have changed since then. That problem was resolved by setting PersistenceRequired on the llama. But now that no longer works. I explicitly set it on the trader llama when I summoned it, and then checked before the executing the above commands that it was set (to 1b).
Thank you for your report!
We're tracking this issue in MC-274238, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki