If you look at a piece of received postal mail it will have a date stamped on it, the “postmark.” That shows when it was in possession of the Post Office and run through the sorting/stamping process.
If you drop it in a PO mailbox or PO slot after the last posted collection time, it will not be postmarked that day.
So, for something to be postmarked by the 5th, it has to be in the PO’s possession. To be safe, the 4th is a good last day to shoot for. The recipients will look at the postmark and know if it’s by the 5th. So, yes, it can arrive after the 5th BUT must have a postmark showing the 5th or earlier.