"안녕히 계세요" and "안녕히 계십시오", both are basically same, but the latter is more polite; the former is more casual/plain.
"안녕히 가세요/가십시오" these are used when someone leaves from you, for example, your customer leaves from your store.
Thus, those are can be used at the same time by their positions.
Customer: Okey. Here is my credit card.
Clerk: Wait a second... All right. It's done.
Customer: 감사합니다. 안녕히 계세요.
Clerk: 네. 안녕히 가세요.
As you can see, in this situation, the customer can say "안녕히 계세요," then the clerk would say "안녕히 가세요."
In daily routine, "-세요" forms are usually used, if the situation is more formal, it is likely that "-십시오" forms are used.
Hope it helps. :)