I figured it out. I used "Simulink.Mask..." to set the property of the mask in the S function setup which doesn't seem to trigger the S function to run like set_param does.
mask_object = Simulink.Mask.get(gcb);
display_script = mask_object.Display;
Do some stuff to the value of display_script
mask_object.Display = display_script;