Housing Lottery Account (주택청약종합저축)

I recently went to the bank to connect my ARC to my account, and the lady who helped me also opened a 주택청약종합저축 account for me. I didn't totally understand, and only 20,000 was deposited, so I didn't mind at the time.

After, I looked up the lottery system. I am a foreigner (American) who's working here but unsure how long I will stay in Korea (at least 2 years, but not sure about long-term). Is it worth it to keep this account? Can I withdraw my deposits if I decide to leave Korea?

Any advice or info would be much appreciated!