Attaching ship to comet with grable causes comet to be renamed if probe on the ship has naming configuration set.
Since comets aren't probes and you can't set a naming configuration on them, they take the same name as your ship while attached and do not reclaim their original name when released.
I need to rename this but I can't. The problem isn't that the comet gets renamed, but that the contract gets a new name in it. In my case, the comet was named Edberry 1 and the contract changed after my ship called Comet Sampler released the comet. The mission now reads "take a surface sample from Comet Sampler" while the comet is still named "Edberry 1".
I don't know why I can't edit the original post. I used to be able to do that before.