I am a teacher, and on the first days of term we have no work and we want to leave early, 3 hours before the end of the working day, and the administration allows that.
If there is no work and the administration allows the teachers to leave, then there is no sin on you if you leave, because the administration is authorized to decide what is in the best interests of the work and to divide tasks among employees.
Shaykh Ibn Baaz (may Allaah have mercy on him) was asked about an employee who, when he has finished his work, leaves before working hours are over, especially during Ramadaan. Is that permissible?
He replied: It is not permissible, and he has to stay at work until the working hours are over, unless he has permission from his boss, because some new work may come up, and he may be needed. So the employee should stay at work until the working hours are over, unless he has permission from the state or from his boss. End quote from Fataawa Noor ‘ala al-Darb.
And Allaah knows best.