C++ Widget component pointer is fine but the Blueprint child returns null


Im hoping someone could give me some help understanding what is happening here. I have a C++ component called InventoryComponent that my widgets need to get data from to correctly display information on the screen. I pass the InventoryComponent by pointer to my C++ class Widget_InventoryGrid. There are some things easier done in Blueprints so I have created a BPW_InventoryGrid which is a child of Widget_InventoryGrid.

The pointer variable InventoryComponent has the following UPROPERTY:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = Component, meta = (AllowPrivateAccess = “true”))

When I go to run the game, on BPW_InventoryGrid I have on EventConstruct a call to a C++ created function that is Blueprintpure called “TryGetInventoryComponent”. This function first checks in C++ if the InventoryComponent variable is a nullptr or not then prints to LogTemp the result. It then returns InventoryComponent. After calling that function I take the return value in Blueprint and check to see if the return is valid or not.

My results always are that C++ is good to go, the InventoryComponent is valid. The child BP? Not valid, InventoryComponent is never valid.

I can write other functions in C++ like “GetInventorySize” that’s dependent on a valid InventoryComponent and can return the InventorySize in blueprint but I CANNOT return the InventoryComponent itself. What am I missing? Not quite sure what to check in this situation. Any help is welcome. I can provide more information as requested. Thank you

TL;DR - the C++ class returns a valid pointer variable that its child Blueprint says is a nullptr.