This is untrue - different states have different standards by which mail in ballots will be counted. A postmark on or before Election Day is no guarantee your vote will be tallied, depending on where you live.
And in places like California which take a long time to count ballots they usually announce results and the election is effectvely over before everything is counted.
Most places will make the announcement once the outstanding ballots are extremely unlikely to change the result of the election.
So if Candidate A is winning 500,000 to 400,000 but 150,000 ballots are still outstanding then they'll make the call for Candidate A because there is no reason to think that the outstanding ballots will be that much different in distribution than the already counted ballots. This can be adjusted based on historical precedent as well, if you know that late counting precincts tend to vote in a certain way then you can make educated guesses as to when the results of that precinct will no longer make a difference. Even after adding in some extra margin for safety you can call the race.
The tricky part is when a race is really close and you have to count every ballot. This is when waiting 3-5 days for the mail to finish trickling in is going to cause cable news anchors to lose sleep.