/Engine/Source/Runtime/Engine/Public/MaterialShared.h
The returned value is not const because the expression is used to build the Strata tree and this requires to execute multiple such as link function caller, compile expression, etc. See HLSLTranslator.cpp for the single use case.
Nullptr if this is not a material used to generate a preview of a node of a material graph.
virtual [UMaterialExpression](API\Runtime\Engine\Materials\UMaterialExpression) * GetMaterialGraphNodePreviewExpression() const