Mike,
I think we all wish you well in sorting out this issue.
But ...................... I am still left to wonder whether your dealer has spent the time to check/set the suspension, check the wiring/relay/flapper/headlight mountings/bulbs & set headlight aim correctly. Seems pretty simple, but I have my doubts. Why can't they put you out on a loan bike & get their guys to ride the thing at night & see for themselves? Who do you use incidentally? Maybe local Forum members can guide you elsewhere.
Believe me, I have been there with some crazy issues over the years & if there is one thing I have learnt from these occasional problems (thankfully), it is that dealers rarely spend sufficient time in the analysis stage, neither do they work progressively towards seeking out a logical solution. It runs a bit like this. You rock up with the bike - the tech guys know you have an issue - they all hate electrical gremlin type issues/ghost problems - the boss wants them to get the jobs through for 90% plus time chargeout - Yamaha's input isn't much help as you are a unique case. So your bike sits in the back of the shop, until all other work is cleared, they've been out for a smoke & copious tea/coffee has been drunk - then, in a rush around 4 pm they have a quick look, phone Yamaha & basically get nowhere - Yamaha don't want to spend warranty time/money on chasing ghosts. You call to pick up the bike at days end, get presented with the headlight replacement solution, but little commitment in reality & get sent on your way no further forward.
I would like to think I am being just a cynical old scrote.......... but I would bet I am not too far wrong.
Changing the light may well solve the issue as it will force your dealer to look at the wiring/connectors & set up the headlight aim as a matter of course, but it is hardly a methodical solution & I wonder, anyway, whether Yamaha will cooperate over such an expensive, reliable component. Anyway, we all know that the beam set-up on the ES bikes has been woeful, from the factory, yet adjustment is not deemed appropriate for us customers for some reason (6-33 Owner's manual). Yet in 6-35 we are allowed to pull the whole unit forward to change the inaccessible aux light bulbs. I don't get it. Maybe the light units are factory mounted & fine adjustment left to the dealer PDI, I don't know - what I do know is that my dipped lights were dazzling everybody from the get go & main beam lit the treetops, not the road. The issue was sorted with some significant downward beam adjustment, remembering that setting up has to be with the full weight of the rider seated & the bike upright, off the stand, preferably against a light setting wall graphic. I used a level area ahead of my garage door, with some tape for the height markers.
The last time I encountered frustration on this scale you are enduring Mike, I had to get the Importer's Customer Services Team involved direct & I managed to talk things through with their technical expert - he then dictated a logical sequence of checks to the local dealer, that sorted out the issue. Basically, he took ownership of the problem & it was soon sorted. The only alternative that I can think of is to solicit opinion elsewhere, as we all would with human health, if we weren't getting the right answers.
Good luck; keep us posted ............................. KEN