In this scenario, your parameter is not considered as tunable and therefore treated as an invariant constant. So the design ranges do not apply and we take the actual value into consideration. You need to specify and use a tunable parameter in order to leverage the design ranges during range analysis.
You can do this using Simulink.Parameter object, specify the design min, max for the parameter value. In order to make the parameter tunable, you need to set the storage class to a value other than the default “Auto” setting.
Here is one way to specify the parameter with ‘Model Default’ as the storage class:
myGain = Simulink.Parameter(2);
myGain.Min = 1;
myGain.Max = 64;
myGain.StorageClass = 'Model Default';
Please use the attached example to follow the suggestions above.
Please refer to the doc link for more information on derive range analysis with Simulink parameter objects.