When you put your cursor over @p while using a command, a box comes up that says "Nearest Player." When you put your cursor over a player name in chat, a box comes up that shows their name, their id, and the fact that they are a player. If you use a command in chat and put your cursor over both, then the texts get displayed at the same time. This overlay appears to be restricted only to chat.
Linked issues
duplicates 1
Attachments
Comments 2
Yes, MC-192918 is the exact same issue, which means this should probably be marked as a duplicate.
Hello! Does MC-192918 describe your issue?