When the 45th Parliament of Australia, it will be a legitimately elected parliament according to the Australian Constitution and the Commonwealth Electoral Act 1918.
Whoever demonstrates the confidence of the House at that time will be the legitimate government of Australia.
Whether that government “won” or “lost” the national two-party preferred totals is irrelevant (at the bottom of the linked page).
I grant that these totals are fascinating, particularly when they are so close, but they remain irrelevant to the legitimacy or otherwise of a government.
This is as true of a hung parliament as it is of a majority parliament. Cf the 1998 federal election where the coalition received 49% of the national two-party preferred vote, and won 54% of the seats.
It should also be noted that these are national totals, and usually include seats won by independents and minor parties. Essentially the AEC is required to do a separate count of those seats to indicate which of the major parties received the highest preference, ignoring the candidate who actually won.
i.e. the national two-party preferred total, by design, erases all others.
EDIT: I stand corrected – the above may be true for the final totals, but the currently reported totals are omitting 14 seats:
So don’t put too much weight on that national two-party preferred total, don’t use it as a measure of legitimacy, and equally don’t use it as evidence (or otherwise) of a mandate.