TArray of EditInlineNew subobjects that is Instanced does not hold references when a member of native subobject

Your build settings need the AIModule.

header:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = “Behavior”)
class UAIPerceptionComponent* PerceptionComp;

in cpp:
#include “Perception/AIPerceptionComponent.h”

PerceptionComp = ObjectInitializer.CreateOptionalDefaultSubobject(this, TEXT(“PerceptionComp”));