Many drugs are prescribed in ways that take advantages of their side effects. Indeed, many drugs are designed for one purpose but perform a second purpose much better.
It’s clear that these drugs cause weight loss (in everyone) so I’m not sure what further certification and testing might show