Problems with Z

On carves where I clear material the “Z” doesn’t always go to the same depth when it moves and I end up with uneven areas and have to sand them out so the cleared area is flat. Is there a setting or something I need to look at?