If you don't find any problems with the headlight switch or associated wiring .
I thought of another possibility, if I'm not mistaken, you have a North American spec bike .
On these bikes, there is a relay that shuts off the headlights when the starter is in operation .
It's an odd relay, in the unpowered, or relaxed position, the electrical contacts are making contact allowing power to the headlight switch for low beam and high beam, the passing position isn't powered from this relay, when the start button is pressed, there is a jumper wire from the start relay to the headlight relay, it gets powered and the contacts open shutting off the power to the headlight switch .
If you don't find any other causes, you may want to investigate this .
Hope I didn't confuse you too much !!!
