Even if you have Tier 4 immigration permission that allows you to work, you should not work if you leave your course or take a break from it before you have completed it. This includes the situation where your Tier 4 sponsor withdraws sponsorship temporarily because you need to re-sit exams or repeat some of your course and do not need to be in the UK before you re-sit or repeat.
The reason is that your permission to work depends on your being sponsored to follow a course of study that has work rights attached to it, and your education provider will have reported to the Home Office that it is withdrawing sponsorship from you. The same applies if your Tier 4 sponsor's licence has been revoked.
However, you might be able to work or continue working if you have completed your course early or if you are in the process of changing sponsor.
For full details of when employers may and may not employ you in these and similar circumstances, see information under the heading, 'Impact of a change of circumstances on a Tier 4 points based system student's right to work' in the Home Office publication, Employer's guide to right to work checks.