Have you checked the headlight relay unit ? (the relay is near the battery = older model ,Ā or if your bike is a newer model , it will be on the LEFT pillion cover inside.)
Also check the left switch gear inside for corroded contacts and also the yellow plug of the switch gear going in to the harness
// Meditation doesn't mean you have to sit still....