H4 Intent to Deny received while Visa is still valid and my H1b approved for renewal


Hello. I am living in the US on H1b and my wife is living with me on H4 status. We have been granted a 5-year visa when we first moved to the US in 2014. Since last year was my petition expiration date. My company applied for my H1b and I filed for my wife H4. Unfortunately, my wife was abroad (In Pakistan) at the time our lawyer filed the petition. My H1B is approved and she received an H4 Intent to Deny letter stating that she was out of the country at the time. Since our visa is still valid until 2019 what should we do considering I got my petition approved until 2020. Is she supposed to leave the country and apply from Pakistan for a new visa?