I went through something similar.
Sometimes it would act like the kill switch was off.
Problem came and went as the bars were turned.
It turned out to be the harness side pin of the kill switch feed at the connector in the headlight bucket - loose in the connector.
Pull it back (out) - dead.
Push it in - ok.
The circuit next to it was tight in the connector, so I zip tied the loose one to it.
So far, so good.