Energy loss of electrons in solar atmosphere taking many-body interactions into account