your employment contract with your employer. Very rarely but it does happen, if the contract has a duration (e.g., 20 days, 3 years, 6 months, etc.) they can't fire you without compensation, but more offen, there is no stated period of employment, then, your relationship with your company is at-will employment, and your company can fire you any time, even for no reason.
Whether your employer has started process to apply to a GC for you has nothing to do with whether your employer can terminate the employment relationship, unless it expressly states so in your employment contract.