You can continue working for the new company from the moment they apply for the H1B transfer. But there are a few companies that do not allow this.
https://www.uscis.gov/news/news-releases/uscis-publishes-fin...
Thats not how it works unless the company that terminated your employment also revokes your H1-B visa. if your transfer is filed before the revocation then you're mostly fine, but now that theres no premium processing who knows?
EDIT: Thanks everyone for clearing it out. Looks like it's allowed and documented here: https://www.murthy.com/2011/06/27/h1b-faqs/ (Ques. 5). Not an official USCIS link though.