Prior to replacing the door lock, was the ER DR failure occurring or did it only occur after replacing the door lock? This can hep identify where we may need to start inspecting or testing.
That should not be necessary. The error ER DR is going to indicate a drain error and it is likely that the error code was there previously. When the washer finished the cycle as far as it did, was the water drained out properly or did it still have some water in the tub?
With the washer empty, try to run a quick wash cycle to identify how far it fills the tub. Does it fill up to the door or does it stay under the door? Also, when it drains in this cycle, does it give off the same error code?
It sounds like the washer is overfilling, which can cause a drain failure since it will take much longer for the washer to drain. With this being the case, if there is no debris in the tub-to-pump hose where the pressure hose connects, the issue would likely fall with the pressure sensor starting to fail and allowing excess water to fill in.
You nailed it. I found that the tube leading to the sensor was full of debris, cleaned it out and put it all back together. Then ran a quick load that ran perfectly with no error code.