UE4.19 compilation error with game configuration

When compile with the following configuration: shipping, development, debug, there will be a lot compilation errors, like:

\Engine\Source\Editor\BlueprintGraph\Classes\EdGraphSchema_K2.h(465): error C3668: ‘UEdGraphSchema_K2::GetPinDisplayName’: method with override specifier ‘override’ did not override any base class methods
\engine\source\editor\blueprintgraph\classes\K2Node.h(180): error C3668: ‘UK2Node::ReconstructNode’: method with override specifier ‘override’ did not override any base class methods
\engine\source\editor\blueprintgraph\classes\K2Node.h(181): error C3668: ‘UK2Node::GetNodeTitleColor’: method with override specifier ‘override’ did not override any base class methods
\engine\source\editor\blueprintgraph\classes\K2Node.h(182): error C3668: ‘UK2Node::AutowireNewNode’: method with override specifier ‘override’ did not override any base class methods
\engine\source\editor\blueprintgraph\classes\K2Node.h(183): error C3668: ‘UK2Node::PinConnectionListChanged’: method with override specifier ‘override’ did not override any base class methods
\engine\source\editor\blueprintgraph\classes\K2Node.h(184): error C3668: ‘UK2Node::GetJumpTargetForDoubleClick’: method with override specifier ‘override’ did not override any base class methods

The reason is, codes only in editor mode are compiled in game configuration

// EdGraphSchema.h line 781

#if WITH_EDITORONLY_DATA
/** Get the name to show in the editor /
virtual FText GetPinDisplayName(const UEdGraphPin
Pin) const;
#endif // WITH_EDITORONLY_DATA

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

I am experiencing this issue as well in the 4.20.1 release; any update on a fix or workaround for packaging a project in 4.20.1 which encounters these build errors?