It seems to work no matter where you are and what you are doing. Ensure that the character to eat the food is the one highlighted white on the Inventory page - like equipping, BG3 uses the 'magic hand' to have characters interact with equipment carried by someone else. I wasted a few healing potions by clicking 'drink' and then realising that a perfectly healthy character was highlighted and was gulping the potion, presumably whilst laughing at the character bleeding to death.
I'll try it again and follow your advice. RIP to all that food I tossed, like the wasteful, first-worlder that I am. LOL!