Importance of out-of-plane dispersion of the excitation spectrum of superconducting bilayers with Josephson coupling