In 26.2-Snap6 MC-307684 was fixed, preserving the persistence of a renamed mob when picked up. This should be the case for when renaming a bucketed mob in anvil similar to if you named it with a name tag, like how MC-54556 should work (nudge, nudge. entity_data is right there).
Reproduction Steps
Create a new creative world
Rename any bucket-able mob, i.e sulfur cube, axolotl, salmon etc. in a anvil
Either place and do /data get entity @n[type=!minecraft:player] or /data get entity @s SelectedItem with the bucketed mob selected
Note PeristenceRequired is not set (i.e PeristenceRequired: 0b) on the entity or the lack of PeristenceRequired on the item
Thank you for helping us improve Minecraft! We saved your files: