The main problem is "temporary", as patents have a flat duration but fields innovate and turn over at different speeds - compare web software to aeronautics/NASA software. The former could potentially he outdated within months, the latter likely won't be used until it's been tested for decades.
So obviously a 30-year patent is potentially paralyzing in webdev, yet might even be too short in space tech!
The problem is there simply isn't any duration that can satisfy both fields.
Meanwhile, often patents don't benefit anyone because they're 1) more trouble than they're worth to actually enforce, and only serve to reinforce the incumbents who don't need them, and 2) are in some cases deliberately written to be meaningless and uncommunicative, which defeats the purpose of open publishing in the first place.
Every law might have upsides, but that doesn't change the fact that patents are fundamentally flawed.