My son just had the f21 error code and once in a while the sud code too. Water would remain in the tub.
Cleaned out the filter underneath. Worked once then repeated the error. Took pump apart and impeller resistance against magnets was felt and could hear pump running.
Ended up with repairman coming out and found out it was an obstruction in the ball valve drain. Google didn't pop up with any f21 errors that showed the ball valve being a problem. I didn't see him take it apart but it doesn't look hard from the diagram. Just another hose clamp beyond taking the pump out.
See the diagram here part#6
https://www.ifixit.com/Answers/View/67289/F02+Error+Code+HE3+Elite+Washer
There was a piece of this material (several times thicker than a dryer sheet) about 4x8 plugging it up. No idea where it came from.