Some phones offer battery saving features that are too aggressive and may interfere with GPS tracking when the app is closed. Info on how to fix this is available here: https://dontkillmyapp.com/