I know stanley are not what they once were but I'd say John was right sounds like your screw has become a bit loose there needs to be a bit of rounding to the swich to allow it to rock and lock into place!
When this happens on mine I like to take the whole thing apart and give it proper clean down and remove the crud thet invariably gets stuck in the cracks and on the threads. I tighten up the screw so i can't operate the switch and then slacken it off until I can lock it down with just my thum while I hold the handle as if to plane.