Why do we discard imaginary part of the phase spectrum?
Phase spectrum by itself is a real function of frequency and, therefore, does not contain any imaginary parts. It is the fourier transform which is in general a complex function of frequency, henceforth, may include real and imaginary parts. But neither the magnitude spectrum nor the phase spectrum contain(s) any imaginary parts.

Phase spectrum is a real function. Whatever methods/functions (correct or not) you use to obtain it does not and shall not change this fact. $H(e^{j\omega}) = |H(e^{j\omega})| e^{j\phi(w)} $ where the $\phi(w)$ contains the phase spectrum and the absolute value part is the magnitude spectrum. Both are real. You shall use a proper function and method in your environment to obtain those signals from $H(e^{j\omega})$