Using dynamic topology makes weird artifacts
In your Properties panel > Tool > Dyntopo, Your Detail Size is too high, and as your Refine Method was either on Collapse Edges or on Subdivide Collapse it was creating large triangles and bad artifacts. So, decrease the Detail Size from 12 to 2 for example.