Heltec Wifi Kit 32 V3 does not reboot with attached battery

Hello. I am using Heltec WiFi Kt 32 V3 with external I2c 4X20 display (with PCF8574). All works fine, when I am switching power from USB to LiPo battery. Switching the power from LiPo battery to USB (or 5V pin) crashes the code. I2C display shows garbage. Manually resetting help, the code starts to run again, but i would like to avoid that.

Can anoyone advise?