Resource leveling will indeed lengthen the project, but this is not the real problem. The real problem is why the resources were leveled in the first place, it was because they were over-allocated, for example, a resource working 7 hours a day was allocated 11 hours. While some resources are able to work extra hours every day for a small period, that workload cannot be sustained and resources need to rest otherwise the productivity will be adversely affected and the costs will increase.
Resource-leveling is not a best practice, instead, it is a response to a bad scheduling decision made by the project manager (over-allocating the resource).