I have the same problem. Consider the following (which are my observations and which may not be shared by others):
1) A good strategy is to let the dough rest in the bowl for 20 minutes or so after you have more or less mixed the flour and water. This is called "autolyzing." Add the water to the bowl, add MOST of the flour, mix for a few minutes until the mixture is more or less uniform, then stop. Pull the dough off the hook and let it rest in the bowl for 20 minutes. Then, resume mixing, add your yeast, salt, and oil. The advantage is that the rest incorporates the water into the flour and makes the dough more pliable - the machine works more effectively.
2) While mixing, have a rubber spatula in hand. Stop the mixer every few minutes, and push the dough ball down on the hook, and resume mixing.
3) You really don't knead (pun intended) to knead the dough for very long in the mixer. I just do mine until the oil, salt, and yeast have been incorporated. Then I remove the dough from the bowl, knead by hand for a couple minutes, and form balls for individual pies. The hand kneading evens out any remaining hard/dense spots and allows me to check for evenness of consistency.