Tomographic-spectral approach for dark matter detection in the cross-correlation between cosmic shear and diffuse γ-ray emission