Two sailors have died after being struck on their yachts during a race in Australia hit by bad weather, organisers have said.