There is one fact that is worth remembering:
Although your metabolism can be slowed by genetics, illnesses, medication, age and so forth...
Your body cannot make fat out of thin air.
In order to lay down fat it has to be fed more calories than it needs.
Medication will not cause weight gain on it's own. The weight has to come from somewhere, and unless the tablets are 3,000 calories apiece, it's not your medication.
I've been there; I put on weight when I was on the pill. The hormonal changes I underwent on the pill caused me to eat more high-calorie foods.
Your medication may slow your metabolism so that you're burning very little energy, but it is not altering the laws of physics. Nothing in the world can make you gain weight other than an excess of unused energy (calories).
If you are gaining weight, it is because you are taking in more calories than you are burning. It is physically impossible for your body to create fat out of nothing.
You can increase the amount you burn, or you can decrease the amount you take in.
If you burn much fewer calories than someone else, whether through genetics, medication, or other, then that's unfair, but that's how it is. Find out how your body burns energy and adapt to your own unique circumstances.