I'll try to give a qualitative answer without the need for math.
While the 45° angle gives the maximum distance for same height, this has to be adjusted for height differences, resulting in a flatter optimum angle. Why?
We know that the projectile follows a parabola, meaning that on its downward path it'll pass through launch height under the same angle as it was launched.
The path can be divided into two parts, the above-launch and the below-launch part.
Let's imagine an angle slightly flatter, e.g. 44°. The above-launch part will still make nearly the same distance as the 45° launch (close to an optimum, things change slowly), but the continuation (the below-launch part) will make more distance because of the flatter angle.
An angle steeper than 45° cannot result in a greater overall distance, as then both parts make a shorter distance (the above-launch part because we are away from its 45° optimum, and the below-lauch part because of the steeper downward angle).
The optimum will surely be at some positive, upward angle, as launching with a downward component will surely be worse (it reduces both horizontal speed as well as flight time when compared to a horizontal launch).
So the question remains where between 0° and 45° is the optimum. This can only be answered exactly using math, at some angle where the loss in above-launch distance is no longer compensated by the gain in below-launch distance.