That’s why you tax soft drinks instead of taxing weight directly. It may be difficult to lose weight but it isn’t particularly difficult to cut out the most extremely unhealthy foods.
You also need to consider that a sugar tax can hit lower income people a bit harder.
It cuts in many ways: save money and gain health by drinking water/tea/coffee instead of softdrinks. Use the money for healthier foods.