Entertain the assumption that patents as property is the right way to go. In that case, no, it is not better if the patents are simply freed up for the world to use in the case of bankruptcy. Companies count on being able to sell their patent portfolio if things go south, just like with any other asset. If the rules were such that the property right disappears as soon as the inventor stops being able to produce products based on the patents, then the patents become much more ephemeral property rights, and the incentive to invest in patents is reduced, because businesses don't like to deal with fragile rights.
I'll use a concrete example. I used to work for a startup where the only thing we really did was develop technology. We protected our technology with patents. We had no interest in getting mired in competing with big companies in producing actual products, because that wasn't a game we could win--whoever had the best supply chain/cheapest Chinese labor would win that battle. In the case of that company, if dissolution of the business meant losing the patents to the public domain instead of being able to sell them off, then we would have been very hestitant to invest in the technology in the first place. It would have meant that if we couldn't go forward as a successful business, we couldn't just sell off our assets and cut our losses. Rather, we would have done years of research with nothing to show for it. From a business point of view, there is a lot of value in being able to treat a patent like any other piece of property, which you can buy, sell, leverage in bankruptcy, etc.
You can't just consider the case where good patents get put into the public domain. You have to balance that against all the cases where people don't invest in technology because they consider the resulting patents too fragile. And I know on HN people develop technology just for the thrill of it (in their free time no less), but in most of the engineering field technology development is extremely capital intensive, and reducing the value of patents by making them ephemeral would discourage R&D investment.