Many events have a bit of a grace period once the last item is being given to the NPC, so others can get rid of their items and get participation. Many events also have a timer, so if you hand in the last item 15 seconds before the event ends and the NPC gives it another 60 seconds of grace period, the event fails.

Just joking, it doesn’t fail. That would be an immensily inept way to design a game. All items being handed in has priority, the event checks for that before declaring fail or success state.

Except in current content. The beacon part of the Nayos meta, for example.