Free market solutions break down when demand AND SUPPLY are BOTH inelastic, and that's only if you count 'price goes up' as market failure. Think of it this way - the demand for food is inelastic. Does this mean free market solutions for food have broken down?
Governments preventing price increases just means that supply doesn't increase nearly as quickly as it would otherwise.
Letting masks sell for $25 a pop so that companies are incentivized to build infrastructure to churn them out at an optimal rate 6 months from now just doesn't seem like a realistic solution
Letting masks sell for $25/ct now so that companies can afford to go to 24/7 production NOW and not have to worry about paying unemployment in 2 months might be, though.
Governments preventing price increases just means that supply doesn't increase nearly as quickly as it would otherwise.