1) If your H-1 transfer happens during your trip, you may need enter with a H-1 visa to maintain your H-1b status. In order to maintain your H-1b, you need to go back to the same employer after returning under AP. In this regard,after you come back on H-1B visa and go to the new employer there is actually no gap.
2) Gap is not a problem if you decide to switch to EAD after coming back.