This likely comes down to ankle mobility. If your ankles are inflexible, it's difficult to keep your feet flat while performing a squat. To fix this, add some ankle mobility exercises into your workout regime using just your body weight or resistance bands.