Component properties being overwritten after initial load

Hi,

So the issue is the following. I’ve got a component that stores some kind of struct. For example:

USTRUCT()
struct FNode {
    GENERATED_BODY()
    
    UPROPERTY();
    int Value;
};

USTRUCT() 
struct FNodeContainer {
    GENERATED_BODY()

    UPROPERTY();
    FNode Node;
    UPROPERTY();
    FString Name;
}

UCLASS()
class UNodeComponent {
...
    UPROPERTY()
    TArray<FNodeContainer> NodeContainers;
}

The issue is the following. If I add this component to an existing actor (mostly metahumans in my case), add some nodes, then restart the editor - the values stay mostly the same.

But if I add the component to the actor’s blueprint, add nodes, and then restart the editor - the values are set to default ones in the C++ code, although editor for some of them shows correct values (except the custom FComponentVisualizer not showing some things it’s supposed to show).

I’ve looked into the code, and it seems UNodeComponent::OnRegister is called three times for the case with the component in actor’s blueprint, with one garbage collection in between. Once when the map is loaded (with correct values), then the component gets garbage collected, and then when component gets re-registered + UserConstructionScripts.

Is there a way to get proper values when for components added to actor’s blueprint when reloading?