Are there Utility Monsters in Economics?
There is a type of protection called a liability rule, where I, $A$, can take something from $B$, if I pay the damages $c$ which are court-ordered preemptively. Copyright law is all about liability rules. If the damages are correlated with $B$'s valuation appropriately, then efficiency holds. You are interested in the opposite case. If IP law doesn't get it right, this would be an example matching your hypothetical as I understand it. And some might say this is justified. A company might want to keep some research under wraps to prevent competitors from also using it and making it even more valuable to society through investment. So the expiration of a patent might fit this scenario in a roundabout way too if we start the model where the company already owns the patent and a court is deciding when to let it expire.

Reference: Exchange Efficiency With Weak Property Rights.