C++ UPROPERTY actor component variable being set to null

Encountered the same issue on UE4.21.1.

It seems UPROPERTY is indeed the culprit here.

For me having changed UPROPERTY(BlueprintReadOnly) to UPROPERTY(EditDefaultsOnly) seemed to have worked for my Actor Component.

Before, whenever I would reference the Actor Component from a deriving Actor Blueprint, it would throw an error, saying the component is dereferenced e.g: Accessed None trying to read property MyComponent.

This is just speculation on my part, but it might be that setting UPROPERTY makes the component prone to garbage collection, especially when the component is mostly empty or has a few print calls.