What’s a pilot to do in this case? For one, initiate an immediate climb at best angle of climb, not best rate, while being cautious to maintain situational awareness and control of the airplane. If there are any lights or visible terrain around, use them. Head directly toward distant light. If you can see it, it means there’s nothing between you and it. As you approach it, select another light and head for it. If the light seems to flicker or disappears, it means there is something between you and it. Immediately pick another light to fly toward.