Tax return for resident alien left US in the middle of the year

Hi, I came to the US with a J1 visa on September-01-2018. My residency status change date is January-1-2020 (the third calendar year of my J1 visa). I left the US and went to my home country by July-15-2020 (while being a resident alien). I did not earn any money when I was in my home country during July-Dec of 2020. Now I am back in the US as a student with an F1 visa from January-2021. 

 

While I am filing tax returns for 2020. Can I file as a resident alien (1040) only or I need to do it as a dual-status resident (both 1040 and 1040NR)?

 

I see posts recommending 1040 only. So I am a bit confused.