I think this is a bug, but maybe it was "works as intended"
What I expected to happen was...:
Wandering Traders that are named using the name tag never despawn in the world.
What actually happened was...:
We can't make Wandering Traders never despawn whithout cheat! (Such as using spawn eggs or use /summon commmand.)
Steps to Reproduce:
1. Find a Wandering Trader that spawned in nature.
2. Using name tag to named it.
3. Wait for 40 minutes, it would disappeared!
I can't use English very well, so this description maybe had some grammars are wrong.
Thank you for your report!
We're tracking this issue in MC-143982, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.
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