Answer
Permanent set (plastic deformation) occurs when the stress at the wave peaks exceeds the material's yield strength $\sigma_y$. If this happens at high temperatures, it is likely due to 'stress relaxation'. Even if the calculated stress was below $\sigma_y$ at room temperature, the yield strength of materials like 17-7PH drops as temperature increases. Another possibility is 'over-compression' to the solid height where the actual stress $\sigma = \frac{48 \cdot E \cdot t \cdot f}{\u03C0^2 \cdot D_m^2}$ exceeds the elastic limit. To fix this, the spring should be 'preset' (compressed to solid height during manufacturing) to induce beneficial compressive residual stresses, or the material should be upgraded to a superalloy like Nimonic 90.