There isn't really a latest departure time. The limiting factor is the night noise quota movements the airline has allocated. Departing after 2330 is a night movement and uses some of the quota. BA have an allocation that are used for the 0430-0600 arrivals, there is only a small overrun allowed for late departures. If the quota looks like being exceeded over a season then BA tend to reschedule some of the Pre 0600 arrivals to after 0600 to make up for it towards the end of the season.
Ops will make a decision based on crew hours, the night quota and myriad other things before cancelling.