Unfortunately, it sounds like your cutting out problem is being caused by the battery, not the controller.
Do the LEDs on the throttle control go out completely when the motor cuts? if so it could be a poor connection on the battery plug, or possibly a faulty group of cells within the battery.
Your 36V battery consists of 10 groups of cells which are individually monitored by the battery management system
(BMS). If the voltage across any of the groups of cells falls below a predetermined level, the
BMS will automatically disconnect power to prevent the cell voltage from going too low and causing permanent damage. Normally, this would only happen when the battery was almost completely discharged. But if one of more groups of cells has become faulty, this could easily cause the voltage to fall too low on the faulty group/s of cells when the motor was under load, even with a fully charged battery.
As you've mentioned that this problem only started after being used in heavy rain, I'm wondering whether water may have got inside the battery and somehow affected the
BMS circuit board, producing a similar effect, or perhaps the water might have somehow affected the cells themselves.
In order to try and confirm the cause of the problem you would need to check the voltage across each of the cell groups while the battery was under load, to see if one group was reading significantly lower than the others, but that's not going to be an easy thing to check.
Alan