Ah that’s a shame. The code seems to try to get the name of the node for the input command. For this it calls GetNodeTitle
on the ClassDefaultObject (see https://github.com/EpicGames/UnrealEngine/blob/072300df18a94f18077ca20a14224b5d99fee872/Engine/Source/Editor/Kismet/Private/BlueprintEditorCommands.cpp#L351). But unfortunately for UK2Node_MathExpression
this calls FBlueprintEditorUtils::FindBlueprintForNodeChecked
which fails the check, since the CDO isn’t actually part of any specific Blueprint.