Yeah, these two issues can be true but at the same time they don't have to be insurmontable problems. Social interaction extends beyond the workplace. At work, your relations with employees, colleagues, clients and bosses are all conditional, as in dependent on performance-driven results. You may not always get to be "yourself" at work. But outside of work, your social interaction and relations aren't so conditional on delivering results, you may simply enjoy the company of friends for example, with no expectation of any benefit besides the joy of doing something with your friends. The key is maintaining a network of good family and friend relations outside of work. Not always easy that is true, but it is necessary to maintain the mental well-being as one enters old age in retirement.
And speaking of mental health, the second point on mental decline after retirement can be forestall with exercise and yes, keeping your mind occupied instead of idling the days away doing nothing. Yes, as you age, you may no longer do the long distance running or swimming you can do in your youth. But exercise does not have to be streneous and intense, a quiet morning walk of sufficient duration each day may be adequate. Likewise, keeping your mind occupied can be something enjoyable, like doing a hobby you have a passion for, or if you have the time and money, go on a long holiday to explore fascinating destinations and learn more about the world. After all, learning is a life long thing, it doesn't end upon graduation from school or retirement from work. Maintaining that desire to learn new things will keep your mind active and slow the decline.