Potentially the GPS didn’t get a fix, so it’s logged you sat in one location for all that time. If you’re out somewhere with no signal then it can’t use Assisted GPS to get a quick fix and might have been waiting for several minutes to get the fix purely from the satellites. If you then shove it deep inside a backpack or something it may never get the fix.
Where do you keep the phone when riding? Ideally it needs clear line of sight to satellites, though a top pocket in a backpack works okay.
Depends on the phone/device. Some have better receivers than others.