Using
{if (side leader _x == side *unit*) then {_hc hcSetGroup [_x];};} forEach allGroups; inside the mission; *unit* is replaced with the name of the unit synched to the High Command module
does reliably put groups under the command of the Commander unit, both local and on server. AI locality however remains with the server.