There is no restriction on travel while an H-1B extension is pending. You could even return with a valid visa prior to the expiration if necessary. Travel will not invalidate the pending petition. You should, however, affix both the I-94 with which you return and the one that you get with the extension to your passport and surrender both when traveling abroad next.