The losses are heat. Resistive heating is 100% efficient. Use a heat pump though and you can get to 300%-400% efficiency because you are using the energy to move heat from one place to another instead of turning it into heat.
Referring to COP as efficiency is an intentionally misleading practise pushed by the heat pump industry that makes communication worse for everyone forever if we accept it and doesn't really help anyone.
Refer to it as COP or as moving 3 units of heat for one unit of input.