When air resistance is a factor, as the object moves straight upward, it loses more speed each second than if there were no air. As it falls, it gains less speed each second than if there were no air. It will return to its original level with a lower speed, and less KE than it started with. This does not violate the law of energy conservation, because some of the original KE has gone into thermal energy (heating the air and the ball). The total energy is the same.