I think the best solution is not a SambaPOS one - just don’t end the work period until they are definitely closed, i.e. locked the door, no chance of new customers walking in. I think this is really a staff training issue that is best resolved that way rather than trying to create a solution around an issue caused by the staff.
Otherwise like you say, virtual work periods changing at 12pm. However virtual work periods do not trigger any event as they are not technically starting/ending a work period. You still need to end work period manually periodically in order to handle stock takes, etc. It was mentioned before here: