Maybe, if you only measure gain/loss for society in terms of money.
But if you care about leaving a habitable planet for the next generation, having oil and gas companies become pariahs that are expensive, so that people switch to carbon-friendly alternatives, would be a net gain for society.