It does not have anything to do with the vanilla chunk loading. An active redstone current that is carried out of the player's render distance (into unloaded chunks), will cause the chunk that it is in, to load.
Anyways, you said it stops working
further than 32 blocks. The minimum render distance is 2 chunks for java and simulation, 4. The command blocks should definitely load within the lazy chunks. Furthermore, if a redstone current is being outputted by the comparator, the chunk will load for the redstone.
I have a feeling this has to do with the command running in the command block. Check if the command has been limited in the x, z coords (length) (it is usually in the form
dx = ... or
dz = ...)
If this does not work, try putting a ticking area near the command blocks by the command:
/tickingarea add which will force load chunks in the certain area or put a redstone clock: Easy redstone clock, which does same using the redstone mechanics mentioned above.