That's correct. It actually avoids the problem in the first place.
The food that goes to the landfill turns into methane, but the food doesn't have to go to the landfill in the first place. It should be eaten as food. If you eat that food, you get back everything invested in the supply chain up to that point—the grocery store, the distribution, the manufacturer and the agricultural step.
Food is meant to be food; it's not meant to be a resource to turn into something else.