Thank you for turning to Fråga Juristen with your question! I will describe the applicable rules for subletting an apartment (bostadrätt) as well as give you a recommendation in your specific situation.
Renting out an apartment
The rules for renting out an apartment (bostadsrätt) can be found in bostadsrättslagen. It is there stated that the owner of an apartment may sublet the apartment to someone else for independent use only if the board gives consent (7 kap. 10 §). The reason for subletting the apartment can for example be that the tenant is studying or working abroad or in another city or for a trial period is moving in with a partner. The board can only deny consent if there are specific and legitimate reasons, for example a suspicion that the tenant is renting out only to make a profit or if the secondary tenant has bad references. If the board gives consent to rent out, the permit should be limited to a certain time. The boards rules for when consent shall be given and for how long can be found in the tenant association statues (bostadsrättsföreningens stadgar).
However, if the board refuses to give its consent to a tenant renting out an apartment, the tenant can still rent it out in case the rental committee (hyresnämnden) gives permission (7 kap. 11 §).
What happens if the board refuses to give consent?
If the board has a legitimate and justified reason to refuse consent, the tenant is not allowed to sublet the apartment to someone else. If the board has given permission for a certain time, the tenant is not allowed to sublet the apartment to someone else for longer than that, unless the board agrees to extend the permission. If the tenant rents out the apartment without the boards permission, it is reason for forfeit. This means that the association is entitled to terminate the tenants right to the apartment (7 kap. 18 § p. 2) if the tenant fails to make a correction, that is to without delay discontinue the second-hand subletting (7 kap. 20 §).
My recommendation in your situation
In September 2020, you have been renting out your apartment for two years. This is a normal amount of time that association boards normally give consent to. After these two years, you are no longer allowed to rent out your apartment. However, the board can not force you to either move back or to sell your apartment. You are allowed to live somewhere else but still keep your apartment, but not to rent it out.
As mentioned above, an owner of an apartment can still rent it out even though the board refuses consent, but only if the rental committee (hyresnämnden) gives permission. I therefore recommend you to turn to the rental committee to seek permission to rent out your apartment for a longer period of time than the board has given permission to. If the rental committee does not give permission to extend for longer than September 2020, you are not allowed to rent out your apartment after this time. If you do so anyway, you risk losing your apartment. If you do not want to sell it nor move back, your option is to keep the apartment empty until you do want to sell it or move back.
I hope this has answered your question. If you have any more questions or queries, you can read more at Familjens Jurist about your responsibilities as an apartment owner as well as make an appointment for legal counseling about second-hand rental agreement, either on the phone or a personal meeting.