did you correctly set your constant in the production? (you need to set it to true, and restart your app)
take a look at the intro here :
https://docs.mendix.com/refguide/constants/
"Constants are used to define configuration values. These can differ per environment.
When running the application on a licensed Mendix Cloud environment, SAP BTP, or Private Cloud you can configure the constant values for each environment separately using the Model Options tab of the Environment Details page to set your constants.
For other cloud environments – for example, MindSphere – the constants can be accessed as Environment Variables in, for instance, Cloud Foundry. The constant is exposed with the name module + . + constant (for example, mymodule.myconstant
).
When running the application locally or in a Free App environment, the values defined in Studio Pro are used."