FExpressionInput* BaseColorInput = UnrealMaterial->GetExpressionInputForProperty(EMaterialProperty::MP_BaseColor);
UnrealMaterial->GetEditorOnlyData()->ExpressionCollection.Expressions.Add(TextureExpression);
BaseColorInput->Expression = TextureExpression;
It works well for me.