Hi Janet, thanks for your question about the role of Deputy Prime Minister.
As you stated, the Prime Minister is always a member of the House of Representatives. This is by convention—tradition—; there is no rule that the Prime Minister can not be a senator. However, the Prime Minister, as the leader of the government, would want to be a member of the House of Representatives because this is where government is formed.
The Deputy Prime Minister is also always a member of the House of Representatives. This means that if the Prime Minister is unable to fulfil their duties, the Deputy Prime Minister can act in their place.