I mean, changing shareholder laws to allow companies to not prioritize profits > everything? That sounds exactly like the sort of thing the shareholders are going to want the company to fight against. It's the same problem (whether it targets only ESG or not).
As far as I understand the legal landscape, if a solar panel manufacturer turned down a capture and kill takeover offer from an oil company, they'd have to make a case on how it would be financially more beneficial for them to remain independent.
They'd get a summary judgement against them for saying "We think oil will cook our planet, and we will continue doing the less profitable thing because we want our planet to survive."
Which... seems insane that that couldn't be a valid defense. But then, our legal system isn't overly tuned to heading off planet altering, existence-scale threats.
The sea change has been big investors throwing their clout behind ESG initiatives, which would have been laughable even in the 00s.
If we wanted what we espouse to want to happen (big oil got in the renewable business) when we wanted it to happen (1990s?), we should have been pushing for more ESG-flexible shareholder laws & case law for the last few decades.