You were misinformed. Racing stops the instant that the Double Yellow is displayed. There is no racing to the yellow (all cars are already in a Yellow zone).
From 6.1.1.B:
DOUBLE YELLOW, DISPLAYED AT ALL STATIONS – Indicates the entire course is under yellow (full course
yellow). All stations will display double yellow flags for all pace and safety car laps. SLOW DOWN, NO
PASSING. However, cars may carefully pass emergency vehicles and other cars that are disabled or off
pace (see 6.6.2.).
NOTE: A driver may encounter several flags before reaching the emergency area. The requirements are still
the same: SLOW DOWN, NO PASSING.