https://www.border.gov.au/Lega/Lega/Form/Immi-FAQs/do-i-need-a-visa-to-transit-through-australiaHi,
Anyone knows if tix shows layover in Australia of 8 hrs , is it necessary to get
transit visa?
https://www.border.gov.au/Lega/Lega/Form/Immi-FAQs/do-i-need-a-visa-to-transit-through-australia
"hold a confirmed onward booking to leave Australia to travel to a third country on the same or another aircraft within 8 hours of arrival in Australia"
I think the answer to be safe is yes. You should check with your ticketing agent, or risk being denied boarding at the airport.