Federal Tax Residency Status for 2024 (Non USA citizen left the US permanently)

I am a non US citizen, non greencard holder.

I have been living in the US on temporary visas since 2016 (the latest visa being the H1-B).

 

I was in the USA till March 4th 2024 on an H1-B temporary visa.

On March 4th 2024, I left the USA permanently.

 

For 2024 I meet the substantial presence test, however I also left the USA permanently that year.

Can I file as a resident alien for federal tax purposes in 2024 or do I have to file as a dual-status alien for 2024?

 

(I read Pub 519 and it mentions that in order to be able to use an earlier residency termination date for the year I leave the USA I need to establish a "Closer Connection to a Foreign Country" and establish a "Tax Home" in the foreign country. However I moved to the foreign country without a job to be with my spouse who was studying there. Hence, based on the difficulty of proving my tax home I was thinking I could file as a resident alien for 2024).

 

Thanks.