Currently, there are a number of different institutional frameworks for trying to deal with the issue. Most of them don't work well. We have university patents + tech transfer offices. We have obligated NIH patent holding + licensing available to third parties for NIH sponsored innovations. We have government funded 'incubator'-like institutions with wide or narrow research scopes, etc.
Patents overall are an attempt at a solution for a larger problem - how do we allocate rewards to innovators. Our main model for doing so, academically, is to try and fail to create transparent funding flows to finance enlightenment-style aristocratic researchers (with labs, equipment, staff, etc). We do this in a manner that avoids accusations that they are receiving privileged patronage while also paying lip service to the idea that free-riders, extra-territorial or not, should contribute to the effort.
But note that we're trying to do different things with this one tool - and attempts to fix it in one area often result in breaking it in another. The entire system is just kludge upon kludge because of this.