Dishwashers do not drain completely after a finished cycle.
This is normal. Dishwashers are designed to leave some water in the unit to ensure that the heating element doesn’t overheat.
Therefore, if you suddenly find a large amount of water being retained in your dishwasher, you have a problem.
It could be that the drain hose or sump pump aren’t working properly, or there is a plumbing problem in your home drain lines.
Remove the cover from the air gap and clean it out. This may remove any blockage that could be causing the dishwasher problems while draining.
Also, examine the drain hose to be sure it’s free from anything that is preventing the water from draining completely.
If the problem continues after checking the air gap and the drain hose you should call a professional plumbing. It might be that the drain valve or hose needs to be replaced.