Sounds like a bad switch, the tail light part of the switch has probably fallen out. Within these silly switches there are tiny metal widgets with near microscopic springs that get shifted around to make contact between little metal bumps. If somehow the bottom case gets pulled open a little bit, one or more of the metal bits or springs falls out.
Solution: get an automotive key switch and kludge it in place. This will only have BAT IGN and START terminals. You will lose the parking light function that maybe one in a million riders has ever actually used. Red goes to BAT, black to IGN, nothing to START, and you connect the brown/white and brown wires together. If you want to get fancy you can wire the starter to the start terminal and have key starting like a (old) car.
(old because the new cars I've seen recently don't even have an actual key or keyhole, nor do some of the new bikes)