An editable FComponentReference property on an actor instance can be used to reference another actor's component in the scene. In 4.27 and earlier versions these references were retained when the other actor's class is recompiled. Since UE 5.0 and onward that's no longer the case: the reference is lost when the referenced actor's blueprint class is recompiled.
Reproducable in UE versions 5.0 - 5.4:
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-215444 in the post.