Do these test measurements. Numbers will tell exactly what's wrong:
WHEN BIKE BEHAVES
1. battery voltage with everything OFF, volts = ???
2. battery voltage while pushing start-button, volts = ???
WHEN BIKE MISBEHAVES
3. battery voltage with everything OFF, volts = ???
4. battery voltage while pushing start-button, volts = ???
WHEN BIKE BEHAVES
1. battery voltage with everything OFF, volts = ???
2. battery voltage while pushing start-button, volts = ???
WHEN BIKE MISBEHAVES
3. battery voltage with everything OFF, volts = ???
4. battery voltage while pushing start-button, volts = ???