H1 extension pending adjudication - Emergency travel - Do I require payroll transfer?

Hello Experts,
My H1 got expired on Nov 29,2019. I applied for H1 extension and it is pending with USCIS for adjudication. Due to a personal emergency, I came to India in March 2020. Am I eligible to be in US payroll and work from India till I get a final decison from USCIS OR Do I need to payroll transfer to India till my H1 extension is approved. Is there any legal issue to be on US payroll while my H1 extension is pending adjudication and out of United states. Kindly check and confirm.