The border restrictions are based on Queensland health legislation passed by the Qld Parliament under an order by the chief medical officer, so any legal challenge would have to prove that the Australian Constitution overrode state health laws, which might be tricky to prove as health is managed by the states. The lawyers could go on about that for years, I predict.
Border restrictions Direction (No. 5) | Queensland Health
As for the trucks, trade is allowed to continue anway, but in addition many trucks run by companies based in other states seem to be registered in Qld anyway.