Could be what do suggest as resolution?
Use a water softening agent with the wash cycle...one of the cheapest is Washing Soda, or "Calgon"... Calgon is more expensive. These products bind with the minerals in water so the detergent doesn't react and form a crusty residue.
Also an extra rinse helps too.
If you have a "Water Softner" machine there is no need to use soda or Calgon.
Some apartment/flat blocks also soften the water provided to their residents.