Player heads keep their display names and lore tags after being placed down and picked up again.
This is an unofficial fix for MC-174496, which was finally fixed in 1.20.5!
for Minecraft 1.16 - 1.20.4 (and 1.20.5 to upgrade your world one last time, see the changelog)