From my research, the friction force doesn't do any work, because its point of application is not moving with the body, in other words, it's stationary.
Let's take an example of a sliding cubical object on the surface of the ground with an initial velocity v0. The only force applied to it is the friction force in the opposite direction of movement. So the object will slow down until it stops. Applying the energy balance on the system (object) we have the following equation: dU+dEp+dEk=W+Q. With, dU: variation of internal energy, dEp: variation of potential energy, dEk: variation of kinetic energy, W: work done on the system and Q is the heat absorbed by the system. In our case, dEp=0 (no elevation) and W=Q=0 (no work done on the system and no heat absorbed from outside).
So our equation becomes dU=-dEk=0.5m(v0)². Hence, all the kinetic energy is transformed into internal energy or into heat.