I dont understand. If you are in the pitlane and the time runs out (or leader crosses the finishline) the race would end, if you have choosen that all cars have to cross the finishline you would have to wait until the repair, refuel, tires change is done and then cross the finishline. You should never have an advantage of being in the pits when the race ends.