Germany is thus paying the price for those failed investments, as is any country which energy market is connected to the German market. It is natural for voters to look to the government for a solution for a problem that the government is responsible for.
If history had gone a different direction and kept natural gas prices low, the bet that the government did would had been successful and people would likely had a very different view of the government. People would had enjoyed one of the cheapest electricity prices of the world, burners would be cheaper than electric heaters, and the chemical industry would possible be the biggest in the world. Emissions would still be high but the bet was always to utilize natural gas until green hydrogen could replace it, even if that part of the bet had dubious scientific support).