Two very different words with very different references in the clinical setting.
A patient can be compensated and appear to be stable. But the problem still exists.
A patient can be compensating and still be very unstable because more than one system is affected.
Stable vitals do not always reflect compensation or the lack of. That would depend on the etiology of the problem.
If a patient is compensating then something has gotten their homeostasis out of balance.
Hopefully the body can continue to compensate until the problem that caused the homeostasis to become unbalanced is "stabilized".
Examples of situations involving compensation are metabolic disorders, shock, acid-base disorders, DKA, renal failure, liver failure, respiratory disorders, pulmonary emboli, and so on to just name a few.