$monitor is not printing the all value changes when class variable is used inside the system task

$monitor will print the value only at the end of the time step. If there are multiple changes to same variable in a single timestep(same as your case) then only 1 value(which is last) will be printed.

Put a $display inside the repeat block.