DUE losing program while on 3.3V battery

Looking quickly through the datasheet it may be possible to disable the auto-erase functionality in software. If you understand low-level coding the idea would be to enable PIO on port C pin 0, set it as an output and drive it low. However that will make it impossible to upload new code to the board. If I have read the data sheet correctly you should be able to erase the chip by unplugging the board and holding down the erase button whilst plugging the board back in. Try it at your own risk 8)