If you are leaving U.S, your have to surrander your I-94, which also means, your H1-B visa becomes invalid.
When you reenter U.S with AP, you will not get I-94, which means you entered U.S without a visa, but as a I-485 pending person.
From this point of view. You no longer have H1-B visa.