Adventure team racing scoring

Finished a race earlier where my team had 50 more points than the opposing team and still officially lost the race. I understand how the scoring works, but are we penalized if one team has more or less players? If so, why not just deduct from the score?

I’m not sure how the regular tram adventure is, the only team racing I do is the weekly Trial, but that glitches out sometimes. We could be 1000 points behind and it still gives us the win sometimes.

I have also witnessed that many times. My theory is that a first process calculates the points on the finish screen but the next screen, win/loose, is another processing based on players positions. The effect being that players leaving, before the calculation of win/loose starts, are giving max points to the other team.