For some people, exercise and weight loss did contribute to improvements in brain health, but only partially. Executive functioning (aka short-term memory, planning, attention, impulse control, and task-switching) improved. However, long-term functions, like verbal learning and overall memory, actually got worse.
According to the study, people who were considered overweight at the start were more likely to see improvements than people with obesity were. In both cases, though, blood sugar control was effective.