How to create assignable reference to component in c++?

A have AEnemy c++ class. Based on that class I crate BP_Enemy.
Now in PB_Enemy Details panel I want to have field to which I want to assign one of components (component will be create in blueprint).
in other words, In c++ I need reference to component which will be created in blueprint. I know I that I can create component in c++ by CreateDefaultSubobject<...>(...), but that not the point.

I tried, but non seem to work:

...
protected: // bluprint visible
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship") int mLife = 100;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship") TSubclassOf<UActorComponent> ref1 = {};
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship") TObjectPtr<UActorComponent> ref2;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship") UActorComponent * ref3;
...

Hi.
It looks to me from your screenshot that it is working. You have a subclass variable and it shows none - nothing assigned. That seems like what you wanted. You choose the class in BP and create the component in BP.
Or am I misinterpreting your question?

C++ can’t directly access Blueprint classes.

This is why the core often made in C++ and from one point on everything becomes BPs.

The only way to do something similar is to create a base C++ class you later extend and override in BP. (C++ will see only the base though)

Ofc the same can be done with interfaces too.