This is covered in the USPTO MPEP:
2591 Intervening Rights in Reinstated Patents
Intervening rights in reinstated patents are provided by 35 U.S.C.
41(c)(2) which is reproduced in MPEP § 2501. No patent, the term of
which has been maintained as a result of the acceptance of a late
payment of a maintenance fee, shall abridge or affect the right of any
person or his or her successors in business who made, purchased,
imported, or used after the 6-month grace period but prior to the
acceptance of the late maintenance fee anything protected by the
patent, to continue the use or importation of, or to sell to others to
be used or sold, the specific things made, purchased, imported, or
used. A court before which such matter is in question may provide for
the continued manufacture, use, importation, or sale of the thing
made, purchased, imported, or used as specified, or for the
manufacture, use, importation, or sale of which substantial
preparation was made after the 6-month grace period but before the
acceptance of the late maintenance fee, and it may also provide for
the continued practice of any process, practiced, or for the practice
of which substantial preparation was made, after the 6-month grace
period but prior to the acceptance of the late maintenance fee, to the
extent and under such terms as the court deems equitable for the
protection of investments made or business commenced after the 6-month
grace period but before the acceptance of the late maintenance fee.