Here was the problem on mine, and the fix. Mine was shutting off just as described. The problem was the connector to the throttle position sensor...a 3 pin connector right at the sensor itself. It wasn't making good contact. I found the error accidentally after both adjusting the idle as well as the sensor settings as I searched for the cause of the problem.
I unplugged and plugged the connector back in 3 or 4 times and only when it was well connected did the bike idle perfectly at low rpm and not stall after 5-10 seconds or so.
For insurance, I sprayed the connector pins with electrical contact spray, the kind you use for cleaning carbon potentiometers on radios and and fine electronic contacts.
It runs fine, now.