If you live in a state where you think occupational licensing is a bad thing, then either work to change the law in your own state or move somewhere else.
You are right that the federal government isn't supposed to pass laws that override state laws, but they get around this all the time by attaching strings to federal funds. That's how we get bad policies like Common Core, Michelle Obama's school lunches, and Title IX kangaroo rape courts on college campuses. Yes ideally, we'd have completely free markets at the state level and limited interference by the Feds, but at this point I'll take any win for freedom I can get.
This article illustrates some of the costs on licensing in just one state, Nevada.