Hello and thank you for posting your medical question on E health Forum. I am glad I can help you here.
From the history provided, it seems that you have had serious complications resulting from the surgery, and those complications might have affected the absorptive ability of the intestines. Any condition or procedure that causes destruction of the absorptive surface of the intestines can cause such effects including undesired and persistant weight loss.
A detailed history of the procedures done, the complications that might have occured post surgeries will help to know the actual cause. In addition a barium studies of the intestines, or a Upper and Lower GI endoscopic study along with biopsies will give the exact cause of the persistent weight loss and inability to maintain weight.
In the mean time, you can consult your doctor or a gastroenterologist for medications that can help to improve body mass as well prevent losing weight.
Also you may consider to work with a dietician who can help you plan a good diet, with which you can gain weight on the long run.
I hope you find this helpful.