Rain during the safety car period produced a chaotic restart in the final Supercars race of the weekend in Sydney.