Firstly, ensure you have formation laps enabled in your race/season options.
Ensure you keep up the pace with the cars in front, without overtaking or hitting them, but also don't slow down or drop back too far.
Once you make it back round to the grid, this will unlock.