I will use myself as an example: I have Hashimoto disease, and even treated my metabolism can get so slow that I need to eat so little that I start to have nutrient deficits, for example one of the past dieting attempts resulted in hair loss, brittle nails, cracking skin, because I needed so little calories that when I consumed exactly what I needed, I ended with a protein deficit.
Only solution I found that worked was go for pure weightlifting, literally train as if I was aiming to he an Olympic champion, and even then I still ended overweight (I am 1.75m tall, smallest weight I managed, that was then I was training heavily and had a diet that was almost 100% protein, was 98kg)