I know it’s not the answer for the exact question of the OP, but it’s somehow related:
Without any plugins, in out of the box UE, you can use this node:
#if UE_BUILD_DEBUG
return EBuildConfiguration::Debug;
#elif UE_BUILD_DEVELOPMENT
return bIsDebugGame ? EBuildConfiguration::DebugGame : EBuildConfiguration::Development;
#elif UE_BUILD_SHIPPING
return EBuildConfiguration::Shipping;
#elif UE_BUILD_TEST
return EBuildConfiguration::Test;
#else
return EBuildConfiguration::Unknown;
#endif
It will return one of: Debug, Development, Shipping, Test or Unknown and you can react to the value of this string accordingly.
It’s more granular than IsPackagedForDistribution node but doesn’t require third party wonky plugins to be installed.