Two people have drowned, and a third person has critical head injuries after being swept out to sea on the central Queensland coast.