Nuclear spin longitudinal and transverse response functions in the isovector channel are calculated by the continuum random-phase approximation with the orthogonality condition. This method treats the nucleus as of finite size and with a continuum single-particle spectrum. It can include an imaginary potential for the particle states. The corresponding longitudinal and transverse cross sections for $^{40}(\mathit{p}$,p') at ${E}_{p}$=500 MeV are calculated by distorted-wave impulse approximation fully quantum mechanically which is beyond the previous analyses by the Glauber approximation. The results are compared with the longitudinal-transverse response ratio extracted from the polarization transfer observables of the Los Alamos experiment. Large effects of the finiteness of the nucleus are seen especially in the longitudinal response. Effects of the distortion diminish the softening and hardening due to nuclear correlation, but the enhancement and quenching still remain. These effects cooperatively reduce the ratio.