There really is no reason why you wouldn’t be able to pair government intervention on the demand side (i.e. UBI) with government intervention on the supply side. Simply introduce quotas about supply (e.g. that shops cannot throw away more than 1% of the food they sell), and/or limits on non-productive assets (e.g. freeze rents & Netflix subscription). I’m sure there are many smarter interventions than I was able to come up in 30 seconds as wel.
I've spent a lot of time in volunteering for the food bank in my area and the local grocery stores generally give food away right before it goes bad. They're already incentivized to do this because we give them tax write-offs.
Welcome to the Soviet Union! They tried exactly that and failed spectacularly at it. Centrally planned economy simply does not work, it's a law of nature.