Who said that?
The feds can’t overrule any state laws they choose to.
A state cannot criminalize what the federal constitution permits, it’s true. And where Congress has autthority that conflicts with the states’, it’s true federal law wins.
But Congress has no right to pass any law they please. In general, Congressional power is limited to matters affecting interstate travel or commerce.
That said, Congress does have some ways to flex the federal muscle. An excellent example is the “national” speed limit. Congress has absolutely no authority to tell a state what the speed limit should be. Of course, they are perfectly free to withhold federal highway funds from a state that does not comply with their mandate - but the choice lies with the state.
So why does Congress have the right to criminalize drugs, then?
Because Congress found that the drug trade is inherently inter-state – that is, the vast majority of prohibited drugs originate in one state, or outside the country, and are transported to another state. Based on that finding, Congress had the power to criminalize drugs.
So, what’s to prevent Congress from declaring that it can criminalize, say, shoplifting, by merely “finding” that since the goods being stolen by shoplifters were likely transported across state lines at some point, it has the jurisdiction to legislate against shoplifting?
The answer, as you might have guessed, is the federal court system, which has shown its willingness in the past to curb Congress’ enthusiasm for passing its Constitutionally-imposed boundries. Certainly the reach of federal power is much greater now than it was, say, 150 years ago. But even today, Congress cannot simply make any law it pleases about any subject. There must be some sort of connection to an area over which Congress has jurisdiction.