Definition: Wheel is outside the track if there is pixels between the wheel and the track. The kerb and the white line belong to the track.
Part 1: Grass, gravel, kerb
No wheels outside the track. Exception: Rear wheel may very shortly
be out when it just has left the end of a kerb at the exit
of a corner (this is realistic).
Part 2: White lines
Two wheels may be outside the track, two must be inside.
This rule can best be checked from a still picture when viewing the car from behind in the replay.
That was the definition, now I'll once more try to say the general idea so that anyone understands. NO WHEELS OFF THE TRACK, EXCEPT TWO OVER THE WHITE LINES IN ASPHALT.