If you back off the throttle or open the choke when it starts to die, does it recover? After it dies, will it restart immediately or very shortly? In my experience, those indicate a fuel flow problem, probably at the petcock. Pull the fuel line loose at the carb or better yet, pull the carb and remove the float bowl and see how fast fuel runs out through the float valve and see if the fuel is running in stream. Drips or a very tiny stream indicate a problem in this area.
I've had experiences where the screen in CB350 petcock had a gel film that acted like a check valve at highway speeds, a low float level that would drop the fuel level on an X6 at the top of third gear and make it die and more than one plugged standpipe or screen on petcocks that restricted flow.
An electrical problem could be a possibility, but your problem sounds too consistent for an electrical issue.