Dishwasher not draining before and after pump replacement
There is a float/sensor in dishwashers that tells it when there is water in the unit.
You might have an object that is jamming it up or it's sticking.   It should be an easy fix (if that's it).