That has happened to me in the past on one of my Moto Guzzi's.
It turned out to be a bad batch of a particular make of relay.
As I recall from that time, the thing that everyone with a Moto Guzzi of a similar age and type, replaced the offending relay with a Bosch one of the same spec. They looked slightly bigger so somehow looked better (if that makes sense...lol...)
I got caught out while I was riding in the Scottish Highlands one time, and only found out after the event. After that, I always had a spare one with me at all times. ....but never needed it.