Even with bariatric surgery? Diets would require a lifestyle change to be made consciously and keeping that without falling back to old behaviour. Surgery kinda enforces that, though.
the surgery makes it hard to eat a lot of food at once, but patients over many years adapt by eating smaller amounts continuously, and then the stomach pouch also expands and the small intestine becomes better at absorbing calories...this results in some and sometimes all original weight returning