Cruise control only works part of the time. The control switch has been changed with no resolution. The dealership cannot find a problem
I would think that the dealer would have checked this, but perhaps the brake light switch is sticking intermittently. If the switch is stuck on, the cruise control won’t function.
I agree with Triedaq that the problem may arise from the brake light switch. The next time the cruise control fails, try prying up the brake pedal with your toe. Or tap it a few times and then pry.
I agree with Tiredaq that it could be the brake switch. In any case, you need to find a better mechanic who can diagnose the problem.