If your petition will be filed as a change of status, you will still then have to go back to the US Consulate abroad to consular process for your H-1B visa once the petition is approved since by leaving the US while it is pending will "abandon" the change of status portion of the petition.
Answered on Mar 11th, 2014 at 6:05 PM