Sounds like a bad or loose connection. Next time it dies reach down behind the left headlight, grab the cluster of wiring, and gently move it about. Easiest / fastest test you can do.
NOTE: Problem is less likely to be related to heat (cool down period) as it is to the vibration of the engine. Sometimes simply wiggling the handle bars during start up is enough to realign the connection enough to start, but then the vibration of the engine severs that connection again. Problem is definitely in the wiring.