For many immigration statuses in Sweden, you must leave and apply outside of the country (outside of Schengen for non EU-citizens) to change status. This was even the case before the current right wing government was elected.