DIAGNOSIS Dirt, sawdust, or dry plastic is gumming up the slide mechanism. It's a common issue because the button isn't fully sealed.
FIX With the battery removed, work the button back and forth vigorously dozens of times. This can help loosen packed debris. Then, take a can of electrical contact cleaner (not WD-40). Spray a very small amount into the seams around the sliding button. Immediately work the button back and forth again to work the cleaner in and dissolve any gunk. Wipe away any excess.
IF THAT DIDN'T WORK If it's physically misaligned or cracked, the button housing might be damaged. Inspect it for any visible cracks or deformation that could be causing it to bind on the tool's body.
HEADS UP Don't force it or you could break the internal plastic switch. If contact cleaner doesn't free it up, the switch assembly is a sealed unit and requires disassembly or professional repair to replace.