In the PCA sky subtraction developed by Wild & Hewett for SDSS spectra a spectral feature mask was utilised, so that spectra with emission lines at known places would not change the amplitudes to favour components that could mimic this feature.
I think such a feature could also improve the quality of the sky-subtraction (especially in the filled) with ZAP.
Here is the link to the paper Wild & Hewett: https://academic.oup.com/mnras/article/358/3/1083/1025290