There are two major issues to consider here, first is the difference between a typical uniform price auction used in many electricity markets and the pay as bid mechanism you're recommending. The auction design impacts bidder behavior. I'll spare the mathematical proof, but if a bidder is uncertain about what others in an auction will bid:
- In a uniform price auction (absent market power, which is an issue separate from your concern), each bidder has an incentive to bid their true marginal cost. If they bid less, they might get stuck selling at a price below their marginal cost. If they bid more than marginal cost, they might be called on to produce zero when price was above their marginal cost and it would have been profitable to produce.
- In a pay-as-bid auction, every bidder has an incentive to shade their bids above their true marginal cost. This leads to a case where the auction price is always above the marginal cost of the most expensive producer called upon in a given hour. So while it might "save" money in some hours with a few high-bid producers, it would lead to higher costs in general.
Second, an electricity generator will want to produce when prices are at or above their marginal costs. This means they might earn zero profits some of the time. Most methods of creating electricity, however, require expensive capital equipment and they sink these investments prior to making production decisions. Generators (can, depending on the market design) recover these fixed capital costs by selling electricity when prices are above their marginal costs. Absent periods when price are above marginal costs, a generator would never be able to cover those capital costs and would go out of business.
This also creates an incentive for new firms to enter electricity markets when prices are high. If generators are able to freely enter the market (and again I will spare the mathematical proof), they should earn just enough short-run profit to cover the depreciation of their capital. Large profits in electricity markets will lead to entry, until entry is no longer profitable.
What we're seeing in EU (and to a lesser degree other countries including the US) is the spike in natural gas prices is causing a windfall for generators who rely on other energy sources to produce electricity. If these windfalls are something people expect, there should be sufficient entry that long-run profits of generators are still close to zero. If the windfalls are unanticipated, they result in extranormal profits. Whether firms should be able to retain those windfalls is an equity or political issue, not one of economics.
Remember, however, that investors see these high current fuel prices and will respond to them by investing in new (and likely not gas-powered) generation capacity. In the end, large profits now will lead to the entry of new generation assets which will bring prices down, even if gas prices were to remain high. If you change how generators are remunerated you can destroy that incentive.