More detail would be helpful, for example is it hub motor or mid drive, is this a new problem, spec of motor and battery, age of battery, and so on.
Based on the info given, your battery may be the problem. When you ride in high assistance you ask for high power, which pulls the voltage too low...