I feel it’s a little more nuanced than that…not a simple answer. There are many links between obesity and depression, decreased mind-body connect and awareness of illness, the lack of the wellbeing effects that accompany exercise (if the person is NOT exercising).
Some of the reasons for obesity may be a compensatory mechanism for loneliness, anxiety, stress - all of which can compromise focus and clear thinking.
Other than that’s there no reason to assume that an obese person is any less agile mentally. So if you’re struggling with obesity, it’s worth figuring out the underlying cause and addressing it. For both mental and physical reasons.