Stability Optimization for Perovskite Solar Cells with Two‐Dimensional Materials