They do not finish any laps that they are down. The following sporting regulations are relevant:
59.1. A chequered flag will be the end-of-session signal and will be shown at the Line as soon as the leading car has covered the full
distance in accordance with Article 5.3.
59.3 After receiving the end-of-session signal all cars must proceed on the circuit directly to the parc fermé without any unnecessary
delay, without receiving any object whatsoever and without any
assistance (except that of the marshals if necessary).
62.1 The car placed first will be the one having covered the scheduled distance in the shortest time, or, where appropriate, passed the Line
in the lead at the end of two (2) hours (or more under Article 5.4).
All cars will be classified taking into account the number of complete
laps they have covered, and for those which have completed the same
number of laps, the order in which they crossed the Line.
So under most races the leader brings out the checkered flag at the lap limit and all cars stop racing once they reach the flag.
Going back to Brazil 2021, we can see that only six cars finished on the lead lap. The remainder are shown without a time and just the fact that they finished more than a lap back. They have a lap count less than the leader in the official classifications. That year the two Haas drivers indeed finished 2 laps back and completed only 69 laps.