You can remain in the country as long as your H-4 continues to be pending. You will be in pending status.