One of the most intensely studied scenarios of high-temperature superconductivity (HTS) postulates pairing by exchange of magnetic excitations. Indeed, such excitations have been observed up to optimal doping in the cuprates. In the heavily overdoped regime, neutron scattering measurements indicate that magnetic excitations have effectively disappeared, and this has been argued to cause the demise of HTS with overdoping. Here we use resonant inelastic X-ray scattering, which is sensitive to complementary parts of reciprocal space, to measure the evolution of the magnetic excitations in La(2-x)Sr(x)CuO4 across the entire phase diagram, from a strongly correlated insulator (x = 0) to a non-superconducting metal (x = 0.40). For x = 0, well-defined magnon excitations are observed. These magnons broaden with doping, but they persist with a similar dispersion and comparable intensity all the way to the non-superconducting, heavily overdoped metallic phase. The destruction of HTS with overdoping is therefore caused neither by the general disappearance nor by the overall softening of magnetic excitations. Other factors, such as the redistribution of spectral weight, must be considered.