Current H1 withdrawal while H1 transfer under process

What happens if my current employer withdraws my H1B when H1B transfer to new employer is under process.

Will it cause unlawful presence? or Is it legal to start working with new employer with Receipt Number or Fedex tracking no?

Thanks much in advance

You may join the new employer once you get the copy of I-797 receipt notice. Your current employer will withdraw H1B once you leave them.
I would recommend joining new employer after the petition is approved to be on safe side. Request employer to apply with premium processing if they want you to start asap.