Yes, but the pending I-485 will be denied after your I-824 is approved, and you cannot return to US until you get the immigrant visa one or two years later unless you get the H-1 visa to come back. Also, because your immigration application is employment-based, so the employer has to keep your job or you get a new job when you apply for the immigrant visa. So, you need to think about twice before you make the decision.