Neutral on this, but apparently whether or not it is "food" is a bit more complicated than "if it's with a drink it's not food."
From https://foodchannel.com/2012/do-i-eat-olive-and-other-drink-decorations#:~:text=A%3A,%E2%80%9Cfishing%E2%80%9D%20for%20it).
Q: I want to ask a one question because it always confuse me very much. When we go to parties or functions nowadays, there are “decorated” soft drinks provided to the guests. My question is, if there is a decoration are we supposed to eat it, or not? For example, if there is a slice of mango on the glass, is it bad manners to eat it?
A: It is considered proper etiquette to eat the food items that often decorate a mixed drink, such as an olive or a cherry from a cocktail. If you do, just be sure you have sipped enough of the cocktail to not wet your fingers when you pull the item out (you don’t want to appear to be “fishing” for it). If it is on a toothpick, it is appropriate to eat it at any point as you enjoy your drink, since the bartender has likely chosen that item to complement the flavors of the drink.
When it comes to iced tea or a soft drink adorned with a citrus slice, however, you do not eat it. You may take the slice when your drink is fresh and squeeze a bit of the juice into it, then either slide the slice into the drink or set it aside. Keep in mind that food safety is important and some people prefer not to put the rind into their glass if they are unsure if the rind has been washed or not. You may also politely decline the decoration at a restaurant simply by saying, “Water, no lemon, please.”
Your specific question about mango leads us to assume that the host or hostess has determined that the mango might be a refreshing bite of flavor to complement your soft drink; in that case, as long as it is bite-sized, it is perfectly OK to pop it in your mouth and enjoy.