The hill running aspect makes a huge difference compared with road or any relatively flat racing.
The difference lies in the energy demands of physically moving your legs in a greater range of motion, higher work rate throughout the greater range of motion, increasingly low efficiency and all of the physiological processes around that.
I haven't put that clinically but in essence you have to work a lot harder, with less efficiency so you need much more energy, sooner and faster, with less performance output.
It's not linear. Don't expect simple adjustments by additions (of carbs, insulin).
Hill, mountain or trail running, orienteering and xc skiing have the confounding factors of high uncertainty. They are much harder to plan for precisely. These sports highlight the advantages of planning, strategy, recording, analysis and adjustment.
Looking for a universal formula (from posters) is futile.
The published research (on carb dependent athletes, keto adapted athletes and high vs moderate intensity effort) has ignored these sports with sustained vigorous work rate, biomechanically driven high inefficiency (running up hill) and deliberate uncertainty. Their criteria overlook the defining characteristics of your type of event. They confuse intensity with vigour + work rate × declining efficiency.
The point is that there is no published research durectly helpful on your condition (IDDM) in your type of event (I track many thousands of them) so you really have to accept there is no golden solution already out there.
If you are carb dependent and you start fully tanked then, under that sustained sub-maximal physical load your liver glycogen stores might last 40 minutes, more or less.
You can improve your available carb based energy sources by ingesting glucose before and during the race.
I suggest you experiment with, say, 1/4 of a glucose tablet at planned intervals.
Without knowing more about you, your fitness and the particular event, it is premature to pretend there are "rules" for you.
As a starting point, try taking the first 1/4 tablet 15 or 20 minutes after starting.
Avoid the hype about highly resistant starches. They are interesting, especially for keto adapted endurance athletes in events without the variability and uncertainty of your event.
Leave them for a few year's time
Of course, you need to adjust your available insulin. Less long lasting insulin and more rapid acting insulin.
Easy with a pump. Harder with MDI.
People try to sell formula (via website services or books). Eminent researchers promote some crude theories.
You will need to think about it yourself so you understand your own plan and you make adjustments that make sense for you.
Having experienced your kind of event both carb dependent and keto adapted, the latter is far superior in so many ways. Each to their own journey.
I stiill use the glucose nibble strategy while keto adapted though it is not to meet your problem of severe glycogen.
Lastly, you might be overlooking the essential need to train as you compete.
Some of your training should replicate a hill race (exactly, and also with variable efforts under and over).
This requires planning in the year but you need to do it for both training your body and for learning to calibrate.