これは接続詞+〜ing の分詞構文なので、when leaving とするのが正解で、when leave とは言えません。
ーEmployees must shut down their computers, printers, and other electronic devices when leaving the office for the day.
またはただ単にwhen S + V としても良いです。
ーEmployees must shut down their computers, printers, and other electronic devices when they leave the office for the day.
ご参考まで!
こんにちは!
ご質問ありがとうございます。
『ここって leaveじゃだめですか?leavingが正しい?』について、はい、leaving が正しいです。
Employees must shut down their computers, printers, and other electronic devices when leaving the office for the day.
となります。
参考になれば幸いです。