You might need to look into the battery optimization settings for that app on your phone. It might be putting the app to sleep if you aren't interacting with it routinely during the ride. Also check that the app has full permissions to use the GPS any time.
It might be that the app needs some updates to handle the newer versions of the phones OS that is getting stricter on battery use by apps.