Weight is not the point when it comes to T2 diabetes, although there is a relationship. And weight is not the purpose of either insulin injections or oral diabetes meds. That said, insulin encourages weight gain. Oral meds that increase insulin (gliclazide/glipizide for example) also encourage weight gain. Other oral meds tend to be either neutral to weight gain/loss. A few actually help with weight loss. Jardience comes to mind here, but again, it's intended to manage blood glucose. Any benefit to weight loss is a side-effect.
Note that you can gain or lose weight on any of these protocols, but it may be harder or easier. Your diet has a bigger impact on your weight than your meds do.