Weird time gaps in races

I keep seeing strange behavior in the riders near you list during races, mostly noticeable when riding solo. In terms of relative position, other riders jump back and forth from behind to ahead of me and vice versa (and it’s not a matter of being about to be lapped or anything like that) and the time gaps also make strange jumps in absolute terms. The elapsed distance field still tells the truth, but it is confusing and riders that aren’t supposed to be there often obscure the actual nearest riders on the course.

From observing this, my best guess is that the distance used as the basis for the time gaps (using a standard speed, that part I can live with) is measured as the crow flies rather than along the course, and front/back-ness is somehow determined by the compass direction I’m facing, which of course can vary a lot from one moment to another, especially at sections with hairpin turns. Seems like a really weird way to do this, surely it’s not more difficult to do it based on position/distance along the course instead?.

There may be multiple reasons for this, but I think the most likely is that those riders are experiencing connection issues.

I have a hard time seeing how someone else having a connection issue would make them overtake me, especially if their actual position is several kilometers behind me… I have also seen whole groups of riders actually ahead of me show up behind me all together.