Once you lose few kgs of body weight there is going to be changes in your BMR,hence your calorie intake can be increased as per BMR,it looks like
TSH is also higher,this also could be a reason for weight gain.
Next Steps
from what you have given as your history it looks like your activity is higher,your intake is lower in terms of healthy calories and hence there could be an imbalance kindly connect for a Balanced diet plan as per your BMR & Day' s requirement.
Health Tips
include more protein sources in your diet,from sprouts,eggwhites,mushrooms, lentils, whole pulses,and complex carbohydrates from whole cereals, and good amount of fibre from variety of vegetables, fruits and regulate your physical activity optimally .