As the State Department indicates,
Quote Quoting What to Do if Your Passport Expires Before Your Visa
Unless previously canceled, a visa is valid until its expiration date. Therefore, if the traveler has a valid U.S. visa in an expired passport, do not remove the visa page from the expired passport. You may use it along with a new valid passport for travel and admission to the U.S.