Not saying this has anything to do with your primary concern of the compressor not shutting off but is in regards to your statement of the air compressor sound from your ac compressor. You really should have a set of ac gauges hooked up to your ac system. This will tell you many things that is or is not wrong with the system and/or what is causing the noise you mentioned like maybe excessive high head pressure, something internal like a rod clanging etc. You mentioned that the noise occurs after the system is run awhile so I was thinking increasing head pressure. Has the unit been worked on recently and maybe the refrigerant charge has been contaminated with air and moisture which will cause very high head pressures?