To keep things simple, imagine we were considering a small country that takes the world price of oil as given. Then a windfall profits tax on domestic companies discourages domestic production, but has it has no effect on domestic consumption.By contrast, a Pigovian tax at the gas pump reduces domestic consumption but has no effect on domestic production.
In a hypothetical closed economy, production and consumption are the same, so the two plans become closer. But even then they are not exactly the same. A tax on (accounting) profits is not the same as a tax on production. The former may distort the the choice of factor inputs (that is, capital vs labor), while the latter will not.