Problem descending at maximum speed

I want to plan a circuit for autonomous quadcopter racing, but I have a problem when I want to descend at an angle that allows me to do it at maximum speed. When descending from a waypoint that is 150 meters high to the next waypoint that is 20 meters high, it descends horizontally, making that section too slow. How can I make that section overcoming angles greater than 90°? When changing the value above 80, the drone does not arm. Is there any script that can guide me or another LUA code?