The correct answer, of course, is: It depends.
Every model of GPS receiver is a little different in how it calculates distance. Hopefully the error isn't much. For example, some older receivers came out during the period of Selective Availability, so there was a constant random error floating around, and the receiver would suppress data that showed a very slow ground speed, like less than 1 mph. But, when should it quit doing that and record normally? We've gotten away from Selective Availability now, but similar other random processes are still busy. Some receivers will discard data when you drive through a road tunnel. Typically they don't get any signal inside the tunnel anyway. But, if it had signal on one end and then signal on the other end, should it compute the distance as being continuous through the tunnel? Or, should it just omit the tunnel distance? (There is no perfect answer to this.) If you translate that into a hiker's progress, as you go underneath heavy tree canopy, what should it do for distance computations? Each receiver samples a little differently, so the distance results become different. To prove this, walk up or down the Mount Whitney 97 Switchbacks and then study the track log and distance. Sometimes I get a different distance whether I am going up or down.