H4 Extension Problem - Please Help


I came to the USA in JUL2019 on H4 (i94 and stamped visa valid till JAN2021).

My wife’s H1B petition was expiring in AUG2019. She filed for her H1B extension but did not file for my H4 extension as I had valid visa and i94 till JAN2021. Should I have filed for my H4 extension too? Did i start accruing illegal days after my wife’s petition expired in AUG2019?

I returned to my home country in MAR2020. Was my stay in the US between AUG2019 - MAR2020 legal or not? If illegal, how do i correct this?

If my stay was legal, can I file for my H4 extension from outside the USA using her latest extension petition (approved till DEC2022) or should i be in the US to file for my H4 extension?

Thanks in advance for your help.

How did you get Visa approval until Jan 2021, when her petition was valid until Aug 2019 ?