I ran into similar symptoms a couple weeks ago.
I warmed up the bike. Took it for a spin. Parked it for a minute to grab my stuff, turned the key again, no power.
## Symptoms
Suddenly absolutely zero power to anything, not to headlight, to gauge cluster, nothing. Not a sign of a weak battery.
## Troubleshooting
The ignition circuit. Checked fusebox and fuses, all good. Opened the front headlight housing. Inside it I found the connector leading to the ignition switch (2-wire red and red&whitestripe). Noticed some melted features on the sides of the white connector. With the ignition switch key switched to on, jiggled wires and connectors. Power would intermittently come on.
## Cause
Heat build-up from loose wire connection at the terminals of the connectors, loose connection increases electrical resistance, i.e. heat, melted enough plastic to loosen the contacts more, vicious circle. That also explains why it could happen while riding, as the wires take a bit of time to heat up.
## Solution
Honda changed out the part number for the ignition switch,
and the wire harness. So, if I get a new ignition switch, I might need a new wiring harness, too. I actually did search for Honda's connector specifications, but those individual pieces are too hard to find where I'm from.
I'm afraid of having to rewire an entire bike, so I'll I might splice/solder some wiring ends as suggested also in
https://www.cb750.com/threads/replacement-connector-plugs-92-cb750-nighthawk.9382/,
or just bite the bullet and get a new ignition switch.