I understand the feeling, but logically I think you need to decide if you are a believer of capitalism or socialism. (I know there are other options but those are the big ones in the world today.)? If you choose capitalism, then you can't also say there should be laws or regulations about profiting in a bad situation (like a pandemic) as you wouldn't when in a good situation ("normal" times). If you believe in supply and demand economics, then leave it alone and let supply and demand work their magic.
As soon as you think the government should supply or subsidize masks or anything else, then you're leaning into socialist territory.
And the above is without even getting into the "Is the pandemic worse than a typical flu year?" arguments.