The premise of your ketogenic diet and diabetic issues is straightforward: less carbs require much less insulin and may cause much less blood sugar spikes. Less blood sugar spikes should lead to elevated time in range and much better A1c values (a evaluate of glucose control above the former two https://alch-lab.com/