I'd like to note that every drug has its sets of side effects, and that the use of GLP-1 agonists in clinical vignettes such as in the case of an obese patient with DM are seriously considered.
More specifically, pharmacological therapy of obesity is indicated in patients with BMI > 30kg/m^2 or >= 27kg/m^2 [1] with another aggravating condition, such as DM2 or hypertension.
[1] Pharmacological Management of Obesity: An Endocrine Society Clinical Practice Guideline, The Journal of Clinical Endocrinology & Metabolism, Volume 100, Issue 2, 1 February 2015, Pages 342–362, https://doi.org/10.1210/jc.2014-3415