Your phone “turns off”? What brand is it?
I have an iPhone. I use it for gps tracking in the woods.
One time the power went out in the middle of a trail ride. Later, when I powered up the phone, it somehow had still tracked the entire trip even though the battery supposedly had died and the phone was shut down.
The brand with the battery removed. LOL!