If your code contains E moves the motor will turn or try to do so. Firmware doe snot know about layer height so that is not likely.
What is more likely is a force problem at lower layer height. If nozzle is closer you get more back pressure and the nozzle might fill up higher with plastic and also needs more force. But that would mean it works for a while and then stops working (except first layer if you are too close to bed, so use higher first layer height).