When folks say spectrogram they usually mean the magnitudes or power of the STFT, so as you say, it throws away the phase.
I would say that the spectrogram is a visualization of the STFT magnitudes, in the same way that a line plot is a visualization of the FFT magnitudes. The STFT and FFT are both invertible though.