yeah you can get visa stamped using your h1 , but in that case probably your H4 EAD might be abandoned , so you might need to reapply that using your valid H4 stamping
This is the post from USCIS
You may travel if you are in valid H-4 status and meet all the admission requirements, including having a valid H-4 nonimmigrant visa. However, traveling outside of the United States could cause delays in your case. While you are outside of the United States, we may need additional information to make a decision on your Form I-765 or we may issue a Notice of Intent to Deny (NOID) with an opportunity to respond. If you do not respond on time to a Request for Evidence (RFE) or to the NOID, we may deny your case as abandoned. Additionally, travel outside of the United States may also cause possible delays if we need to reschedule your appointment at an Application Support Center.
Finally, please note that if you file Form I-765 concurrently with Form I-539 requesting a change to H-4 status from a different nonimmigrant classification, we will deny your Form I-539 as abandoned if you travel abroad while your Form I-539 is pending. In this case, we would also deny your Form I-765.
If you choose to depart from the United States before your pending change of status application is approved, we will deny your Form I-539 and Form I-765, even if you are re-admitted as an H-4 nonimmigrant. In such cases, after being admitted into the United States as an H-4 nonimmigrant, you will need to a file a new Form I-765.