The answer should be fairly straightforward. But USCIS has not always been consistent in adjudicating similar cases. They are supposed to follow the “last action” rule. Once GC is approved, then the beneficiary becomes a lawful permanent resident from that point onwards. The pending H-1B extension may be approved but only up to the day before GC approval.
But the varying adjudication outcomes for similar cases shows that USCIS does not always follow a standard protocol. Below are some recent examples. The first is the correct outcome. USCIS approves the H-1B but limits its validity up to the date right before green card is approved. The second and third are a bit worrisome if not absurd. The same USCIS service center decides to issue RFE and basically asks the beneficiary whether they want to give up the green card so that they may approve the H-1B.
Ultimately, the RFEs are not meaningful as the H-1Bs will be withdrawn. But the thought of even issuing RFEs in this situation is shocking. The worst scenario is when USCIS approves the H-1B for the full 3 year period after GC is already approved. The cure in that instance would be to initiate service inquiry request and remind USCIS that nonimmigrant status CANNOT be approved after beneficiary has adjusted to a lawful permanent resident.