I would agree with you,
if the country had been saving any of it. As we currently ran things, the oil sales crowded out other sectors via currency appreciation for no long run gain.
That's environmental concerns aside. There are pretty good global and domestic reasons for leaving the most marginal bits of the gunk in the ground. And leaning into the cycle develops precisely those marginal sources that were most polluting or least profitable.