Two players acting or any three actions if one is a check, constitutes substantial action. Once that happens, the hand must play out if a dealing mistake is discovered. Some examples include:
A missing card is noticed in the deck after two players have acted → hand continues, deck is corrected later
The button was in the wrong spot but players have already bet → the hand stands, button is corrected next deal.
A single card is found face up in the deck (boxed card) but action has already started → that card is just treated as a dead/burn card, not a misdeal.
A player discovers they were skipped in the deal, but two or more others have already acted → that hand is dead, but not a full-table misdeal.