Only true for our current computers and not true with reversible computing.
With reversible computing you can use electricity to perform a calculation and then "push" that electricity back into a battery or a capacitor instead of dumping it to the environment.
It's still a huge challenge, but there is a recent promising attempt:
"British reversible computing startup Vaire has demonstrated an adiabatic reversible computing system with net energy recovery"
https://www.eetimes.com/vaire-demos-energy-recovery-with-rev...
Short introduction video to reversible computing: