Machine goes through all the cycles but on the last cycle it does not complete the cycle water some remains in the tub.
Your drain pump might not be performing as it should, some operate on a timer others may operate based on the pressure switch.
Washing machines are very basic - your schematic is usually located in the controller housing. If you have a mechanical timer : Is the timer itself completing the drain cycle or getting stuck ? For example a bad timer gear - the timer would not finish the drain cycle. I know the washer is not completing drain cycle because of the water but I am asking about the timer - is it operating as it should and completing the drain cycle (I don't care about the water in the tub here - I just care that the timer went all the way around as it should).
Not in any particular order however I would verify 3, 4, 2 and then 1.
- Defective pressure switch not working correctly - indicating empty.
- A defective controller - whether that be a mechanical timer or electronic control board.
- High speed spin during the drain cycle causing a load imbalance?
- Your pump is not a direct drive but belt driven and slipping, or if direct drive your pump impeller is broken reducing the outflow of water. The latter is dependent on the Washing Machine logic control to be of a timed run.