I tried to figure this too. I had this hypothesis: if rocket is launched to some angle instead of straight up, Apoapsis should be more high because planet has curvature.
I tried to calculate how high my Apoapsis would be with this hypothesis. Tried this at Kerbal Space Program and whenever i launched any other angle than UP, Apoapsis was lower.
I figured out that while you move horizontal, gravity pull changes coordination of trajectory, so curvature doesn't have any affect on calculations and therefore distance traveled is same as calculating it planarwith trajectory formula.
Distance traveled horizontally formula is: 2*cos(angle)Velocitysin(angle)*velocity/gravity.