Travelling while h4 is processing

Hi my spouse’s h1 visa is approved and am waiting for my h4 to be approved. Will it be a problem for me to leave the country while the h4 visa is under processing? As I need to get my visa stamped before coming back will it be a problem in the visa interview that I left the country in that state? My spouse’s h4 isn’t stamped yet. Please help