Moreover, contraband flows toward the places where it's prohibited. If certain firearms went from not prohibited to prohibited then they would flow in rather than out.
And I'm not saying a national ban would have no effect, only that it would have a similar effect to a state-level ban -- regular people would follow the law, and then you might get e.g. fewer firearms suicides (but more non-firearms suicides). But if you expect gangs to stop arming themselves because of "borders" or national law, just look at Mexico.
Clearly there is a spectrum of choices that can be made, some more effective than others. As mentioned, state borders have effectively zero restriction in movement and should be taken in context with any criticism of local gun laws.
Guns aren't exactly rocket science to make, and the plans are available online. Good guns, reliable guns, safe guns? Not so much, but why would the criminals in question care?