LG Washer WM3431HW dE Code

I replaced the door lock switch on my LG Washer WM3431HW, but I continue to get the dE code mid-cycle.

When I open and close the door several times, it inevitably locks and the cycle continues.

What else can I try? Replacing the door hook?