I used spawn eggs to spawn in villagers, creepers, mooshrooms, and pigs.
I used nametags to name the mobs, then summoned lightning to convert them (and in the case of the villager, I did a separate test with a zombie).
In each case, the PersistenceRequired bit was set to 1 immediately following NameTag use.
In the case of the mooshroom and creeper transformations, lightning did NOT set/clear the PersistenceRequired to 0. It remained 1.
In the case of the villager>witch, pig>zombie_pigman, and villager>zombie_villager conversions, they DID lose their PersistenceRequired bit.
While I can't know if this is the actual original bug reported, or a separate bug, this is likely one cause of the bug in question, and has a very easy set of reproduction steps.
In 1.15.2 I ran a bit of a test.
I used spawn eggs to spawn in villagers, creepers, mooshrooms, and pigs.
I used nametags to name the mobs, then summoned lightning to convert them (and in the case of the villager, I did a separate test with a zombie).
In each case, the PersistenceRequired bit was set to 1 immediately following NameTag use.
In the case of the mooshroom and creeper transformations, lightning did NOT set/clear the PersistenceRequired to 0. It remained 1.
In the case of the villager>witch, pig>zombie_pigman, and villager>zombie_villager conversions, they DID lose their PersistenceRequired bit.
While I can't know if this is the actual original bug reported, or a separate bug, this is likely one cause of the bug in question, and has a very easy set of reproduction steps.
Inspired by #MC-159298.