Star-forming galaxies provide a larger contribution to the isotropic gamma-ray background than misaligned active galactic nuclei