Weight is a proxy for all sorts of related diet issues. You can lose weight on a Twinkie diet and not be metabolically healthy at the same time.
A healthy diet requires more than just the appropriate caloric intake. Although that’s a great starting point.