Since the latest season update it's not been possible (for me at least) to buy from the shop while food (gapples or steak etc) is selected in the hotbar.
I think this functionality was intended for weapons so that you didn't go into the shop while in a fight but now it, weirdly, applies to food.
I think this functionality was intended for weapons so that you didn't go into the shop while in a fight but now it, weirdly, applies to food.