You certainly don’t want your boss to criticize and reprimand your work before the file is closed, the customer is contacted, or the product moves to the next stage.
I don’t want to disagree with you that one should initially try it in a friendly/verbal way. But the example is poorly chosen: Of course I want to be pointed out a mistake
before the product goes to the customer.
By the way, we recently had a (small) defect in the heating system; one year after moving in. So I politely wrote an email* to the installer. Nothing happened. Tried again. Nothing happened. New email with a rather neutral text to the developer with the installer in cc. Bam: appointment for repair arranged. And when you’ve had experiences like this more often, next time you just immediately resort to the effective measure.
*Yes, the phone might be even friendlier, but I typically only have time for "such things" outside regular business hours.