The game will always consider the best racing time. However, when you see your racing time, not all the milliseconds are displayed in order to keep a cleaner interface. So it may seem like your score is the same as your opponents, but the victory will be attributed to the best time achieved, considering the milliseconds.
You almost got him! We know you'll get him on the next match! ;)