The ideal magnetohydrodynamic torus instability can drive the eruption of coronal mass ejections. The critical threshold of magnetic field strength decay for the onset of the torus instability occurs at different heights in different solar active regions, and understanding this variation could therefore improve space weather prediction. In this work, we aim to find out how the critical torus instability height evolves throughout the solar activity cycle. We study a significant subset of Helioseismic and Magnetic Imager (HMI) and Michelson Doppler Imager Space-Weather HMI Active Region Patches (SHARPs and SMARPs) from 1996 to 2023, totaling 21,584 magnetograms from 4436 unique active-region patches. For each magnetogram, we compute the critical height averaged across the main polarity inversion line, the total unsigned magnetic flux, and the separation between the positive and negative magnetic polarities. We find the critical height in active regions varies with the solar cycle, with higher (lower) average critical heights observed around solar maximum (minimum). We conclude that this is because the critical height is proportional to the separation between opposite magnetic polarities, which in turn is proportional to the total magnetic flux in a region, and more magnetic regions with larger fluxes and larger sizes are observed at solar maximum. This result is noteworthy because, despite the higher critical heights, more coronal mass ejections are observed around solar maximum than at solar minimum.