I would agree that hormone balancing after pituitary surgery is what makes weight a challenge.
Steroids are the most challenging - as you have to take enough to live, but too much can cause steroid induced Cushing's. I had pituitary Cushing's. All the hormones have to be balanced, including growth hormone, to be all right.
If you take steroids this is your problem. My son has craniopharyngioma and the steroids (Prednisone and Cortef) made him gain a lot of weight and he can not loose it. It is not you it is the medicine doing this to you and my heart bleed for you. Good luck and be healthy :)
Have the doctors tested your TSH, free T3 and T4? I wonder if your thyroid went haywire?