A lot of these studies talking about rapid weight rebound are for those who stop cold turkey and have not gone through the inner work of lifestyle change
The current advice for those who have reached their goals or are off ramping is to slowly ween off after successfully maintaining a weight platue at the goal weight for 3-6months on the medicine while ensuring lifestyle changes like diet, sleep, and excersize are internalized and capable of maintaing that goal. The exact best process is still being researched but this process has a lower chance of rebounding than the cold turkey process.