Yes they are. This has been tested and proven since GT6. The AI will run laps 10+ seconds faster or slower than it did in the early laps of the race depending on what it is planned to do, or how it adjusts to the player pace.the AI is not falling back due to a script, you are literally outpacing them.
As people have said, the AI is not straight up programmed to go as fast as possible and try to win like other games. It's programmed to give you the illusion of an exciting race.