Sounds like the reversing valve solenoid dropping out ( as guessing this is an Heat Pump outdoor unit? ) after thermostat satisfies from here,….and refrigerant pressures equaling.
You may want to be pro-active with your system and spray the filter drier body ( as the rust is eating through the metal, and eventually it can develop a refrigerant leak ) with rust paint or liquid roofing sealer sooner than later….