恥ずかしながら私も始めてみる現象でしたが、これは非線形制約が与えられたときに使われる Augmented Lagrangian Genetic Algorithm の挙動の様です。参考:https://jp.mathworks.com/help/gads/description-of-the-nonlinear-constraint-solver.html
myfun.m 内にブレークポイントを置いてみると flag に "interrupt" が発生していることが確認できます。"interrupt" の意味を調べてみると、
'interrupt' — Iteration of a subproblem of a nonlinearly constrained problem for the 'auglag' nonlinear constraint algorithm.
という記載が Genetic Algorithm Options のページにあります。
'auglag' nonlinear constraint algorithm、すなわち Augmented Lagrangian Genetic Algorithm は最適化問題を複数の subproblem に分けて解くようで、1つの subproblem が 1 generation と定義されています。対策としては myfunc.m 内で世代を表すプロットを描くコマンドを flag = "interrupt" の時は描かない、というのはいかがでしょう?
subproblem を解いている間は flag が interrupt であり、State.Generation は subproblem 内の世代を表しますが、1 つの subproblem が終了した時点で flag = iter に1度変化し、この時は定義通り State.Generation が 1 つ増える・・そんなことが起こっています。

