You keep the money in your HSA after you leave a job. There is no requirement to spend it before you terminate employment.