Australian PM future safeguarded in crucial Sydney by-election