Med related weight gain is real. If you are on something like prednisone, or even a common med like an antidepressant, it can be very difficult not to gain weight, and then, to lose it, while still on the meds.
If a health issue restricts mobility, even temporarily, that can also lead to difficult to control weight gain.
I think many people without health/med issues simply don't understand the complications to weight gain and control these issues pose.
As a formerly very slim person, who had to go on prednisone long term, and went up two dress sizes, and had a partner who was not supportive at all, you have my sympathy.
It can be very challenging to a person's self concept; you deserve love and support as you deal with health issues. Ironically, it's the support and non conditional love that will increase your chances of finding and maintaining a healthy weight for you.