when one's back is turned
When one is away or not looking, as in You can count on the children to misbehave when the teacher's back is turned, or I don't dare go on vacation; he'll take my job when my back is turned. Also see when the cat's away, the mice will play.