So this is my version on how to NOT get DQed.
My career settings
25% race
Short qualifying
My qualifying usually using the soft compound, and on the race day, don't change the race strategy at all, just leave it be, I'm using my Q1 tyres until my only scheduled pit stop (around lap 5-10), to medium tyres.
After leaving the pit, just race without making another stop, and at your last 2 laps, usually, they want you to use the alternate compound (the notification will show you to pick between soft or hard compound, even though jeff already told you that pit schedule is completed).
After that notification pop up, the catch is, open your MFD, choose Set HARD Tyres (soft compound will still get you DQed), and Box This Lap, and you'll box at your final lap, you'll be on the hard, and you'll finish the race without DQed.
Note: I changed the difficulty to Easy so I can gain a big gap near the end of the race, otherwise you would lose a lot of position because you have to pit while most of the times AI doesn't.
This is my own fix, I cannot guarantee if this will work with you. With my own settings, this is working so far. At least no DQ.