When this happened to me, it was that the piston in the M/C was no longer moving back all the way to where it is supposed to stop.
It could be corrosion in the bore, it could be that the tiny (TINY) little hole that is supposed to allow the brake fluid to bleed back
after being squeezed is partially plugged, or the piston is binding up on the rubber seal. In any case, it is likely time for a
clean/flush/rebuild of the M/C. With the lever "floppy" as it is, the switch contact is staying "on". If the M/Cylinder hasn't been
given attention in a few years, try to drain/flush/refill it first - if that doesn't work, it is time to get out the wrenches.