The eligibility and amount of the stimulus check is based on your situation on your 2019 tax return, or, if you haven't filed for 2019, your 2018 tax return. In the 2018 tax year, you were an "eligible individual" for the purposes of the stimulus payment, since you were a "resident alien" for tax purposes (you passed the Substantial Presence Test for 2018) and you had a Social Security Number. Therefore, you were eligible for the $1200 check.
You were not an "eligible individual" under the 2019 tax year, since you were a "nonresident alien" for 2019, but that didn't matter because, since you haven't filed a 2019 tax return yet, the year that is used to determine eligibility and amount is switched to 2018 instead of 2019.
You will not have to file a 2020 tax return or pay back any amount. You are not an "eligible individual" under the 2020 tax year (because, again, you would be a "nonresident alien), and so, if you filed a 2020 tax return, you would not get the stimulus tax credit. Although the amount you received in the check reduces the tax credit for the 2020 tax year, the law says that the tax credit is not reduced below 0. So it does not become $0 - $1200 = -$1200 (i.e. you have to pay an extra $1200 tax) on your 2020 tax return even if you filed a tax return; instead, it would remain $0 credit (no credit or extra tax), and you still keep the $1200.