As far as I know, (from older onan generators), if it starts and runs it is making power, just not making it to the panel. The famous "Onan will stay running as long as I hold the start switch down" is generally because the genny isn't producing power or a safety switch is open. If the genny starts and stays running its making power and safety switches are closed.
The reason they do this is when the start switch is held down it is bypassing the safeties in the genny so that it will start even if oil and such has low pressure(which it will till it starts), but if there is an issue with one of the safeties or its not making power it will shut down when start button is released. This is the short explanation.
So the fact that yours starts and runs just fine I would feel pretty confident in saying its a bad connection in wiring or the automatic transfer switch is bad, this is a common problem.
99 F250 Super Cab Short Bed 7.3 Powerstroke
84 24' Yellowstone Camino (oldie)