Continuity mistake: When McQueen leaves Radiator Springs, he still has his new hot rod paint job from Ramone. When he exits the trailer at the track in California, he is back to his racing paint job.
Suggested correction: It did not occur "suddenly". He got repainted somewhere in between his leaving Radiator Springs and arriving at the race. No mistake.
What about immediately after the race? Also note the commentator during the race remarks on his 'white wall tires of all things', which are absent, until he finishes the race that is.
There was no indication that he stopped anywhere else to get repainted bright red for the last race and then painted back to metallic red after the race.
After the race, he comes back to Radiator Springs and Ramon's paint job is back too. So it's really an error.