This is what happens when you don’t understand carbon cycles.
The food that is wasted decomposes and releases CO2 is captured from the atmosphere weeks/ months earlier. It doesn’t add any net new carbon it sequesters carbon captured from the air that was already there.
In other words, when you toss a head of lettuce into the trash and it decomposes, it releases CO2 it captured from the air weeks/ months before when it was growing. It wouldn’t make any difference if you ate it, it would still release nearly all of its CO2 back into the atmosphere except a very small amount that which is captured and stored by your body, but even then, that CO2 is released in the days following (unless you are gaining weight).
As a side note, this is exactly why cows or any other living creature (plant or animal) for that matter do not add any net CO2 to the atmosphere, as a matter of fact, they remove it! Well, sort of.