What causes a full restart vs a resume when battery dies? There are many times where if my macbook pro dies, it will simply resume where it left off once i plug in the power and turn it on. Other times, it will do a complete restarting and I will loose all my unsaved data.

What causes one vs the other? Preferably, I would like it to always resume instead of restart.
This is likely the cause of your system going down while in the process of performing a reboot. The most common cause of this is system updates loading in the background. Lots of times these updates will require a restart after installing. In addition, do you happen to have the computer scheduled for reboot?
This can be confirmed in System Preferences > Energy Saver > Schedule. Resume only occurs if the last known state was you logged into your home account.