You could specify additional options for the 'ga' function you are using. You can start by creating a variable 'options' that uses optimoptions,
options = optimoptions(@ga)
Refer to the link below to see all the options and values you can assign to those options:
https://www.mathworks.com/help/gads/gaoptimset.html
Once you create the 'options' variable, you can change the NonlinearConstraintAlgorthm property to 'penalty' and this may get you closer to the behavior that you are after. Refer to the link below (Penalty Algorithm Section) to better understand how the problem is solved when the NonlinearConstraintAlgorithm option is changed:
https://www.mathworks.com/help/gads/description-of-the-nonlinear-constraint-solver_bqf8bdd.html