The issue is that there is no natural nor Constitutionally-clear dividing line between “substantial” and “unsubstantial”. And the feds like it that way.
There is however a clear difference between commerce and interstate commerce. The courts decision is erroneous because there is a reason that interstate commerce is labeled that. It is not the same as commerce in general, and the courts decision ignores the difference.