Obviously this is a contentious issue, there’s no two ways around that.
My thoughts are that your partner’s body is his/hers to do with as they want. I don’t think it’s any more right to suggest they gain than it is to suggest that they have to remain skinny (which is far more common, and carries its own, different, risks) to be attractive to you. If you are going to be loving and supportive you have to let them be who they are rather than change them to your will. But, when whatever the behaviour is becomes self-destructive, making them unhappy, it’s time to lead them away from that if you can. They may not want to of course.
Every single thing we do carries risks. A lot of focus in the media is about the dangers of being overweight, whether this food is good or bad. It sells copy (or impressions these days), mainly to people who believe that there worth is tied to being a particular (small) size. Does that make them happy? For some, sure, their lifestyle and genetics mean they can successfully do that, but for the rest of us?
Should your partner choose a long life or a happy life? Some kind of compromise? One way or another they will die eventually. Should you get to choose how? When?
Which is more absolutely risky - a meal at a restaurant, or the drive to the restaurant? Working out at the gym, or the trip to the gym? Should you insist that your partner drives as you don’t want to take any responsibility for their health (but make them responsible for yours)? A car crash could be a life-changing or even terminal event coming from a simple mistake or failure to anticipate. Is it any different because there’s some random element, or another person might be involved?
If your partner is into some activity that is risky and enjoys it should you discourage them? Does it make a difference if it’s eating to much or, say, parkour? Does it make a difference if you enjoy their lithe body or their chubby one? Both will have their long term consequences.
My father ate healthily, but too much, and exercised a lot to keep his weight down. He liked being muscular and playing contact sport. In the middle of his life he suffered a lot from joint pain from all the exercise workouts and that made him deeply unhappy for many years. In the end it was dementia that took him - was that caused by the knocks he took? Should he have lived his life differently in retrospect? Should I (or my mother) have encouraged him to change?
What is important? Isn’t happiness important, being good people, supporting each other, having a loving relationship, caring? Is longevity what you should strive for, or something else? Balancing those things is what you have to figure out. We don’t know what life will throw at us or when.
I know, I’ve asked more questions than I’ve answered. I can’t answer them. The thing is for you as a couple to figure out what you want from life.