I140 and 240 days completion while H1B renewal is pending

I have an approved i140.
My most recent i94 is expired now.
H1B visa renewal is in progress - got rfe - submitted rfe response and waiting on uscis.
But 240 days will get completed in a week.
My attorney suggested to file another h1b transfer(and work for same client) and that since i have an approved i140 i can work seamlessly even after 240 days get over.
But I am confused since my i94 has expired and h1b transfer is being initiated after i94 expired. Is it legal to work after 240 days in this case?
If it is legal then should i work as an employee of the first company(old visa extension one) or second company(new visa transfer one) after 240 days gets completed.

Read details here;

Thank you, Anil for the response.
But this post does not specifically mention whether the h1b transfer should be applied before the i94 expires.In my case, my H1B extension was applied before i94 expired. But the new h1b transfer petition was applied after the i94 expiry. Will that still allow me to work after 240 days?
Does having an approved i140 does anything to help in this case?

Attorneys usually suggest to file another H1B just before 240 days expiry to get another 240 days time.

There is no official rule that i can quote here but i have heard many attorneys suggesting this strategy. I have not heard of any issues with this either.