Try thinking about high BG’s as having the opposite effect --you pee out the extra sugar, so you’re not getting the energy or calories from all the food you ate that resulted in the high …sooo, on balance, you are neither gaining or losing weight due to diabetes.
Note: if you have frequent lows, you should speak with your dr about adjusting your insulin, mainly because hypos are dangerous and life threatening, and also, it is technically possible to gain weight if you need to continually eat for hypos.
Trivia fact: In the earlier years of medical intervention for schizophrenia, doctors would inject people with large doses of insulin to cause hypoglycemic comas (which was supposed to “shock” their bodies out of schizophrenia). A side effect of this treatment was weight gain because comas were induced daily for several months, and with each coma, the doctors would give the patients glucose IV to pull them out of it …and of course, since they were not diabetic, their body would convert all that extra sugar into fat. Other side effects were brain damage and irreversible coma. Thankfully this treatment is no longer in use.