It's not exactly true that Truss "rejected any windfall taxes on energy companies" even though the opposition Labour party keep on claiming that:
https://www.channel4.com/news/factcheck/factcheck-labour-kee...Basically, the Tories had already placed a windfall tax on UK oil and gas before Truss even became PM that's almost identical to the one that Labour have called for, and no-one has proposed removing it. (To some extent, it looks like Labour copied the existing Tory tax.) The main reason why Truss' original proposal required so much more taxpayer funding was that her price cap lasted for two years rather than six months - Labour were relying on windfall tax revenue from well before the start of the price subsidy to make their numbers add up and still couldn't quite do it, so there's no way to extend it for longer without massive government borrowing.
Most of the media coverage didn't explain this at all, they just repeated Labour's claims that all that government borrowing was because the Tories were in the pockets of energy companies and rejected a windfall tax. Nor did they explain the practical consequences of the price cap ending in April. All of the numbers thrown around for the cost of Truss' longer price cap assumed energy prices would still be unaffordably high by then, but no-one pointed this out and what it would mean for households. Of course, the moment the government annouced their energy support would end in April there were headlines everywhere about the huge bills this could cause for households.