If something (such as their terms of employment) changes while the employee is employed by you, it may affect their right to be in Sweden.
If the company is changing owners
If your company is changing owners, any employees with work permits need to apply for a new permit. The employee can continue to work for you, as long as you have submitted an application for the new work permit before they take up the new position and before their previous permit expires.
If the employee is going to change occupations or get completely new work responsibilities
If the employee is going to change their occupation or get completely new work responsibilities from you, they need to apply for a new work permit. The employee can continue to work for you, as long as you have submitted an application for the new work permit before the previous permit expires.
If the employment is being terminated
If the employee’s employment is terminated early, for example because you fire the employee or because they quit, the requirements for the permit that the employee has been granted are no longer met.
To give them the opportunity to apply for a new job, the employee can remain in Sweden for three months after their last working day, provided that their permit is still valid during that period.
If the employee does not find a new job within three months or if their permit expires before then, and they do not have the right to stay in Sweden on any other basis, the employee’s permit can be revoked and they must leave the country.