It doesn’t violat anything as far as I know. The commerce clause is generally taken to mean interstate tariffs, etc. I imagine it falls under the same category of different states having different restrictions on firearms, etc.
Technically, DC is Federal, so they have an excuse.
However, other cities ban or restrict hazmat trucks from their streets and bridges, so there’s plenty of precedent. NYC, for instance, does not allow explosives on the Verrazano Bridge.