C++ how to set default value for TObjectPtr<UMaterialInstance>

Can you show the code for your header file with the TObjectPtr? This sounds like a UPROPERTY issue.