Your passport must be valid beyond the approved end date on your I-797 else when you re-enter the U.S., you will only be admitted until the end date of your passport, even though your I-797 expires later. This affects dependent status as well.
Valid H-1B / O-1 visa (except for Canadian citizens)
Valid Approval Notice: I-797
Supporting documents including I-129, and the Labor Certification Application (LCA)
Travel During Extension Process or Change of Employers
If you have any plans to travel outside the U.S. during the H-1B extension process you must speak to a Bechtel advisor. Often the action of departing from the U.S. during the extension process can invalidate the new H-1B extension.
If you plan to leave the U.S. and your current H-1B status has expired, you cannot return to the U.S. until the extension application is approved, and the approval notice is sent to you. You will then have to apply for a new H-1B visa stamp before you can return to the U.S.
You should not travel outside the U.S. during a pending change of status petition.