The medicine which you have taken are not cause weight gain.
If your weight is in limit with respective your height no need to weight gain.
Not advisable for DM 2 weight gain. Balanced diet, exercise, proper medication definitely will put blood
sugar under control possibly weight gain , if you are underweight