H1 transfer during pending H1 extension

HI, my current H1B expired on Sept 30, 2023 and my employer filed for my extension in July 2023. My H1 extension case is still pending. I received a new offer in November and they are filing for my H1 transfer - I wanted to know if there will be any issues if I get my H1 approved with the new employer while my H1 extension with current employer is still pending and upon knowing that I have decided to switch, they withdraw/revoke the extension application?

In situations like this, the pending extension of status application will serve as a bridge for the period between the expiry of your I-94 in sep 2023 till the date H1B gets approved.
I strongly recommend that you join the new employer only after your transfer is approved ( and not at reciept) to avoid a situation of going out of status if your change of status is denied for whatever reason and your current employer has withdrawn your extension of status because you left the job for new.

Thanks for replying. Yes, I won’t leave the current role until the new H1 transfer is approved. But my main question is that once the new H1 is approved, if the current extension is still pending and then my company withdraws it, will it affect me? Another question is, if new H1 transfer is complete but my current company doesn’t withdraw the H1 extension, however, it gets denied for whatever reason, will that affect me?

No. Your employer will withdraw once you join the new employer, so no issues with your H1B status.

No, once you join the new employer and even if your extension is approved or denied, it does impact you.