Don't panic. I have a cis friend who is/was diabetic, has hypogonadism and takes T every day now. He no longer takes metformin nor glypizide. After losing 50 pounds he kicked one drug and after T he kicked the other. He can even eat some carbs now.
My advice is to eat fewer than 100 grams of carbs per day, no more than 50 per meal, then walk for 3 to 5 miles at least 5 days a week. You will lose weight, gain muscle mass and drop BG levels naturally.
I once put up an A1C of 10.5, but now it's half of that. I keep an eye on things, but as long as I don't go nuts on sugar/high glycemic index carbs, I am OK.