I am on H1B with valid stamp until 07/2021. My employer is laying-off people effective 10/31/2019, but they promised to keep us on payroll until 12/31/2019 (required by WARN act). I got another job, and told them I would join late November. Can I travel and be back in Mid-November, and then file H1b with new employer ? Would there be any issues?

I am bit confused about Layoff date (10/31), payroll last date (12/31) and grace period last date (2/28). Is it safe to travel and return before 12/31 ?

Thanks in advance for your suggestion.