I’m reading this two ways;
1) You either mean that when you pull the brake lever, the motor runs.
2) OR when you pull the brake lever, then the throttle will work to run the motor.
If the first case, then there may have been water intrusion somewhere. Probably at the controller location since that is a common location that those wires would meet.
Follow up question to the second case….What happens when you only pull the rear brake lever?