You're about to long rest so you click auto select to get your forty units of food.
Unfortunately, the select option chooses more than forty units of food. This is because it's picking items that are stacked together. I've noticed a lot of youtubers will go in and manually change the selection, oftentimes unstacking food items in the process.
This is not necessary.
Just click the auto select button again, a second time. It will unstack your food and take the selection from the higher amount of food down to the appropriate forty units.
Again, always click "auto select" twice. It works better that way.