would I get full tax refund if I stayed less than 6 months in an year

Hello, 

 

I have been in the US since last 9 years on H1B and have been filing taxes as resident alien, married filing jointly. I am planning to move back to my home country next summer 2024. My question is if I move back before 6 months of 2024, i.e say for ex I move back on Jun15th 2024, and that is less than 6 months of 2024, would I be eligible to get all my federal tax as refund at the end of the year as I did not even stay for 6 months in 2024? Please clarify so that I can plan accordingly. Thanks