Understanding and Suppressing Degradation in Mixed-Dimensional Halide Perovskites