Draining Issue with the Dishwater

Dish water retains dirty water after the cycle once in a while. Could anyone guide me what should I do?

Sounds like the small drain pump did not come on, right? When water pumps out it goes up the hose. Therefore when it can’t pump anymore water the hose remains full and does not fully expell. It does not come back because there is a rubber valve somewhat stopping that water, but slowly it could all come back. Especially if you have a build up of yuck, probably not using Jetdry. I would take apart the washer until you get low as possible from the inside, you might need Torx wrenches. Most people don’t even know, that there can be a lot of calcium build up that starts to mold as it holds onto food particles. Then when the valve breaks down, there can be a lot of back up, build up. CLR for Calcium and Bleach for mold. Bleach never mixes with anything else.