How long can I stay with a expired visa and without a job?

Hi
I am in a unique situation with my h1b. Please help me with this question

I was working for a company A under H1b visa which expired 1 Jan 2020. The company filed for extension before the visa expiration (Dec 2019). The same time I did a h1b visa transfer to company B which is approved until 2022. With that I quit my job with employer A. Now due to some issues, I am running into challenges with joining company B.

  1. How long I can stay in USA with an expired H1B without joining the second employer.

  2. Will my stay be considered as illegal stay if I don’t join the company B and travel out of USA and work in out side the country

  3. Will I have trouble with my future US visa

Thanks