BMI (body mass index), which is based on the height and weight of a person, is an inaccurate measure of body fat content and does not take into account muscle mass, bone density, overall body composition, and racial and sex differences, say researchers from the Perelman School of Medicine, University of Pennsylvania
However, according to recent studies, obesity may also protect against death from all causes, as well as death due to stroke, heart failure and diabetes.
https://www.medicalnewstoday.com/articles/265215#:~:text=BMI (body mass index)%2C,of Medicine%2C University of Pennsylvania.