I can't say for sure as well as if the rules are same for all classes but in general they should take in account if all four wheels are outside the track (white line), if driver use acceleration in such situation and gained position (in such case he should be warned to return position or take a penalty). If driver not gain position there should be warning about exceeded track limit.