You are an "exempt individual" as a student (i.e. days in student status are not counted in the Substantial Presence Test) unless you have been an "exempt individual" for some part of 5 previous calendar years. Assuming you had never been in F or J status before 2013, for 2019, you had only been an exempt individual for some part of 4 previous calendar years (2013, 2014, 2015, and 2018), and thus you were still an exempt individual for your days on F1 in 2019, causing you to not pass the Substantial Presence Test for 2019, and so you were a nonresident alien for all of 2019. Filing 1040 was incorrect, and you should amend it ASAP using 1040X with an attached 1040-NR. The IRS may accept an incorrect tax filing (and in most cases it is not apparent that it is wrong, because they don't know the facts of your stays over the years), but that does not mean you will not face consequences in the future if and when it is discovered.
For 2020, you have been an exempt individual as an F1 student for some part of 5 previous calendar years (2013, 2014, 2015, 2018, and 2019), so you are not an "exempt individual" for any of your days on F1 in 2020 (assuming you don't try to claim to be an exempt individual beyond 5 years by showing closer connection to a foreign country), and you thus (assuming you were in the US in 2020) pass the Substantial Presence Test for 2020 and are a resident alien for all of 2020. So you would file 1040 for 2020.