I had the same problem. Device would die a few minutes after autolocking. Only plugging in the lightning cable would turn it back on. It still has full battery after turning on. Eventually it would stop charging altogether whilst displaying the charge icon (lightning cable was plugged in, and tested on a second device to be functional). This occurred several months after a battery replacement. Turns out I had applied too much solder on the battery contacts. This caused the black sticker covering the soldered contacts to tear and the battery shorted itself against the aluminum battery cover. The fix was, open it, stick black electrical tape on the underside of the battery cover directly over the battery contacts. After putting everything back together. It charges properly and doesn’t turn off after autolocking anymore.