after some research, I think the file PROGRESS_TRACK.XML is responsible for the penalties occurring when you run on the new layout.
when you export the file, you'll see two distinct sections, "gates" and "points" (this "gate" id numbering is different from the one in the AI_TRACK.XML file).
the "gate" section determines the left and right "boundary" of the "track" while the "points" section is for the central line (it is displayed if you turn on the racing line in game I suppose). if you run outside the "boundaries" and gain time, you'll get a warning or a penalty for corner cutting. in case of time trial or practice or quali sessions, you'll get ur laptime invalidated.
according to the coordinates and distances, the last chicane will be the gates id from 194 to 205 and the points id from 730 to 773.
these are all my assumptions based on my discovery so may not be correct eventually but it's worth trying anyways.