This is certainly true. Others will quote that exercise is not an effective mechanism to maintain healthy weight with 40 studies to back it. The goalposts seem to move a lot in this domain. Nevertheless, there is a ton of evidence of people in various behavior patterns that do not have such obesity issues in their society. It's wild to me how many people reach a conclusion of helplessness given that fact. The real kicker is that we aren't talking about one population being 5-10 lbs too heavy. We are taking about a difference between healthy weight and pervasive obesity. It's wild that such a delta is normalized
Exercise is good for a variety of reasons. It will burn some additional calories. But most scientists that specialize in metabolic research believe that the constrained total energy expenditure model and metabolic adaption are at least broadly true. You can't exercise out of a bad diet - and it's difficult even if you believe in a fully additive energy expenditure model.
Diet is the overwhelming deciding factor when it comes to weight gain.