Washer fills with water then drains:
Thecritical questionis. Isthe water is just running down the drain but thepump isn't running. If it is being pumped out, and you can hear the pump running just the same as when it's emptying prior to spin then it could be aborting the wash because it is, or it thinks it's overheating.( due to defective water temperature switch)
If thepump is failing to shut off then there is something wrong with the electronics. If your washer is a mechanical timer controlled device then you may have a sticking switch (which may explain ifswitching cycles does something for you). But if you have an electronic timer then you may be experiencing a board failure, where a cycle is being commanded when it is not intended to by design.
If water isn't being pumped out, but just draining away all the time, the washer will keep detecting there isn't enough water inside and top up with more.
Modern washing machines should be sophisticated enough to realize something's wrong and abort with an error, but if not, it may continue washing or rinsing for a short while before losing enough water to trigger more coming in again. It can get stuck on this cycle indefinitely and it's called siphoning.
Siphoning occurs when the end of the drain hose is lower than the level of the water inside the washing machine.
Try raising the hose and see what happens.
Also the drain hose should have some type of air gap where it fits into the stand pipe. It should not have an air tight fit.
AgainEither it's siphoning down the drain due to an issue with the plumbing, it's overfilling, oralsoifit( THE WATER) overheats thenin some machinesthe software will employa fill and drain tactic to cool down the water. The important thing is to work out which of these different faults is causing the problem by careful observation.
Other switch's to check would be the water inlet valve and the water pressure switch with a multi meter for continuity or OHMS.
Andinsome modern washers that come with THERMISTORS:
One symptom of a washing machine that thinks it's overheatingand thus fills and drains at same time(possibly because of a faultythermistor) is if it's filling with cold water and pumping out at the same time. This is covered in this articleWashing machine fills and drains at same time
although the same symptom can be caused by other faults.
On some models that have belt drive the WIGWAGselenoidcould be defective or the spin and agitate bars could be bent or worn, or the spring worn or broken.
By the way my advice is freecuzGod is good!