The electricity requires a thermal machine, thermal machines are not 100% efficient, so part of it is wasted as radiated heat. That's just thermodynamics.
Now, claiming we shouldn't have AC because their work derives from heat also applies to literally anything that does work, including freezers, so it is not a valid argument at all.
The solution is to rely on solar, as the heat source is external to the planet