First of all, this doesn't just happen in Australia, and there are plenty of examples of the same thing happening literally everywhere.
Second, child rapists generally get caught when a child finally tells an adult who believes them and reports it. After that, the flood gates usually open and more come forward. If you institute the death penalty for rape at all, but especially rape of a child, then the rapist has no reason (beyond continued access) to keep the kid alive after they've abused them.