Training to be able to complete enduro races

Greetings, I just started a TR plan and am loving it. After just 3 weeks I’m already noticing that my power and endurance have grown! I’m on Sweet Spot Base LV, and usually substitute 2 of the indoor rides for outdoor mountain bike trail rides.

Currently I can complete a 2.5 hour ride that has roughly 2,000 feet of climbing. At the end of such a ride, I’m pretty wiped. However, many enduro races have upwards of 4,000 feet of climbing per race! How in the world do people work up to be able to handle that? And if I wanted to get to that point, how long should I expect it to take?

And in general, how have you all trained in order to expand your ride length?