Using a mcfunction to copy a player's name onto an entity (a zombie in this example) as such...
execute as @s run data modify entity @e[type=zombie,limit=1,distance=..6] CustomName set value "{\"text\":\"Zombie \",\"selector\":\"@s\"}"
Names the entity "Zombie " and ignores the selector portion of the string.
I even tried specifying my own <playername> in place of the @s selector, and it still ignores the selector string portion.
Thank you for your report!
We're tracking this issue in MC-131328, 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
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! Please report any issues on Discord or Reddit