Going from H1B to non resident alien

Hi, 

 

I am a Malaysian, currently on a H1B, until June 30th (and have been working here on H1B since 2015), I will be returning to Malaysia on July 6th, and will be working for a telemedicine company, and will be paid as an independent contractor/1099. 

My questions are 

 

1) Will I be paying US taxes on my 1099? I assume I would since I think I am considered a resident alien for 2020 since I was here for more than 183 days.  

2) Would I be paying taxes on 1099 in 2021? 

3) This is a long shot, does anyone here know if I would be taxed twice(by US and Malaysia) this year since I think I will be paying US taxes on my 1099 for 2020, and will be home.