Actually, this all reverts back to the motor control. When the cycle ends, the "beep" is actuated after the motor control sees absolutly no action from the motor. So, when the motor comes to a stop at the very end of the spin, two things happen:
1. The machine will tumble slowly in opposite directions to loosen the load from the sides of the basket.
2. Once this 3-part tumble is complete, the control will end the cycle by issuing 5 beeps.
Methinks your motor control (or maybe the latch) is not sending the proper signals back up to the machine control. Dang those pesky Chinese electrical circuits
If you have any doubts whether the lock spring is actually actuating the switches and releaseing them, you can always observe their activity by removing the front panel, raiaing the main top, then put the door back on for a tes run. You willl be able to see the wax motor slowly retract at the end of the cycle. Once the door lock light is out, the beeps will occur.