Motor goes off as soon as the side stand is outside

Good day, my machine has problems with the side stand from time to time. I know only two systems with side stand, once the first gear is inserted automatically. (only from hearsay had such a thing never) and when the first gear is inserted the motorcycle goes off. My motorcycle does not start at the moment when the side stand is outside. If the engine is already running and no gear is inserted, the machine goes off immediately when the stand is folded out. There is a problem that bothers me little. You have a main stand, but I want to fix it of course. Does anyone have any suspicions? I can’t believe that the switch is a defect, because it only works wrong in itself. Can someone help me there? Or should it be quite normal? mfg Calli