It won’t be retroactively be illegal? It will become illegal exactly next summer?
If SCOTUS does decide tariffs are illegal (which they are, objectively, irrefutably illegal for the POTUS to declare - Congress is explicitly the only branch with this power in the constitution), the US may owe hundreds of billions back to countless organizations and individuals.
But we live in a country without consistent law or a reason-based government, so SCOTUS may just declare that the executive has absolute authority instead.