Deep Sleep Mode (ESP32)

I've been following these two guides to add deep sleep mode to my project for power conservation:

  1. https://lastminuteengineers.com/esp32-deep-sleep-wakeup-sources/
  2. ESP32 Deep Sleep with Arduino IDE and Wake Up Sources | Random Nerd Tutorials

I've chosen to go with touch pad awakening, and it works great, I would definitely recommend using this to keep power consumption low on ESP controllers.

However, I am running into a little bit of a problem. The controller remains in deep sleep mode (and awakens when the touch pad is ... well.... touched), but after a minute to two minutes time, it exits deep sleep mode entirely, and cannot be awakened again, unless the battery is unplugged and plugged back in.

The sleep mode is entered through a library function that is called in the code. Here is the part of the library code pertaining to the sleep mode.

{
touchAttachInterrupt(T6, Callback, WAKEUP_THRESHOLD);
esp_sleep_enable_touchpad_wakeup();
esp_deep_sleep_start();
}

Again, this works exactly as intended for a short time but then the device completely powers down, despite being hooked up to a battery. I'm very confused by this, because the Arduino technically stops executing code after it enters deep sleep, so there is nothing that could possibly tell it to do this.