Carlos Sainz returned to the lead of the Dakar Rally after being retrospectively declared the winner of Sunday's second stage.