We vote for a party, not for a particular leader and religious affiliations, etc., don't really count.  Whilst still a sitting Prime Minister, Tony Abbott was set aside as leader by his own party when the opinion polls were negative about him and replaced by another from his party by means of a party vote.  Wake up one day as Prime Minister, go to bed as a back bencher!!  Happened to previous Prime Minister, Kevin Rudd, when he was replaced by his deputy, who became Australia's first female Prime Minister, then she was replaced by him again when it looked like she would not win the election.  From memory, he was religious, an Anglican, she was an avowed atheist.  Nobody minded.