If the US 'retreats' from Australia because Australia acts like a sovereign country and makes it's own laws as it sees fit, then Australia is better off without them.
The reality is nowhere near as stark, however. Australia can tell the US to go fuck itself over it's latest comments and nothing will likely come of it. Maybe some temporary tariffs - more punishment for US citizens and a slight dip in Australian exports. Big fucking whoop.
It will not 'ruin the relationship' to anywhere near 'retreats from Australia' levels. Australia possibly holds quite a good hand given how important Pine Gap is to US interests in that entire quadrant of the globe. Australia could probably flex on that.