The whole story about losing weight has two chapters: eating differently and taking more regular, realistic amounts of exercise.
Allowing enough time to learn how to be some comfortable, smaller amount of kilograms less weight is the key that opens the door of successfully keeping the weight lost. The goal weight is the interim weight, not the theoretically perfect weight of someone else, an unrecognizable heroine or hero in some other book universe.
Say five kilograms are lost without too much pain over three or four months. After that it might take six months or even a year of learning how to be that weight. All sorts of learning will take place. How the new body shape fits into its surrounding space. Learning how to wear new smaller clothing. A new relaxed posture will become more usual because it becomes normal, instead of a posture as rigid as an economic plastic hose. Letting the eyes become used to seeing a slightly smaller (but not alarmingly smaller) image needs to take place. Learning how much exercise and how much of each food type is needed to eat, in order to maintain the interim weight is a non-trivial challenge involving much guesswork.
The whole story about keeping the weight lost has more chapters than a romance novel.