I had a side stand switch issue recently, but it would start with the side stand up.
Give it a good degreasing as best as you can anyway, and make sure the plunger moves in and out freely.
It's located in a pig of a place though.
I have a new switch I bought still in my top box, but just couldn't get to the old one so ended up shorting the wires out to bypass it instead, and it's been fine ever since.
It's not ideal really but it'll do for now.