It would indeed be good for this to be given some attention. It happens fairly often, and I believe also in other conditions than the one described above, that RWE2 completes tasks minutes before the actual departure time, resulting in the guard whistle being blown (far) too early.
Wouldn't it be possible to impose a simple condition under which a task with departure time of, say, 10:45 can never be completed before that time (or, say, 10 seconds before that, to allow time for the guard whistle)?