All perfect praise be to Allah, The Lord of the Worlds. I testify that none is worthy of worship except Allah and that Muhammad is His slave and messenger.
There is nothing wrong in getting rid of food that contains fluids (sauce and the like) that becomes impure due to a liquid impurity falling into it. One may throw it in the garbage or the like because the impurity cannot be separated from the food, and thus it cannot be used.
However, if a solid impurity falls into it and only part (or some) of it becomes impure, then one should only throw away the part that became impure. If one can make use of the remaining part, then one should benefit from it, as confirmed by Prophet who said about the ghee (cooking butter) into which a mouse had fallen: "Take the mouse out and remove what is around it, and use the rest.”
For more benefit on food into which impurity has fallen, please refer to Fataawa 321622 and 357877.
Allah knows best.