The argument has proven totally wrong, because as every single humanitarian organization that operates in Gaza has repeatedly warned in recent months, famine conditions are the direct result of Israel generally disallowing food and other aid into Gaza since March. Had Hamas actually diverted billions of dollars into their food storage tunnels, then logically they would've continued selling it at market price when demand is high now. But actually in reality, there's nothing to buy. [1]
The market solution to prevent Hamas from profiting off food is to first allow in enough food to Gaza such that babies are no longer starving to death, and to then bring in so much food supply that prices decrease until it's no longer economically profitable to resell food, because it's widely available. That solution is never brought up for some reason.
[1] ‘There is nothing to buy’: Gaza’s descent into mass starvation https://www.ft.com/content/e5d7bcbb-4c9d-47b8-b716-6bd58ad57...