It may be that you will need to check the injector and lambda sensor, get to the ECU to get error codes if possible.
If not, check the fuel pump too.
Then also check the TPS unit , if it shuts off and won’t idle back.
You didn’t tell us if the bike starts right away after dying , if there is a flashing red light etc….. So do the above ^ and report back your findings.
Good luck!