IME this happens because the dishwasher isn't draining properly. So where it normally would drain all the dirty water out and rinse with clean, new water it's only draining some of the dirty water out, and then rinsing with half clean, half dirty water.
Take out the deodoriser thing, then after a cycle, empty then stick your head in and see if the dishwasher itself smells like wet dog/pond water. And then take off the filter cover and see whether there is gross water pooled at the bottom - the bottom of the dishwasher should be empty. You can also check what the water is like when a bowl accidentally flips upside down - the water held inside this should be clear and smell clean, maybe slightly of detergent. If it's gungey and greasy, that's your problem.
If so, you probably have something stopping it from draining effectively. That could be:
Dirty filter - have you taken this out and cleaned/scrubbed regularly? Warning this is a horrible job if it's been left too long.
Something trapped in the impeller (little fan thing) leading to the pump? Be careful when feeling around in here, because broken glass can get trapped in it. But it can also be things like coins, little toys, bits of plastic packaging, meat bones, bits of hard vegetable, etc.
Pump itself being knackered/worn out - this can happen if the machine is old.
Drain pipe blocked with grease and food deposits -you can pull it out and check (this will be very smelly and gross if it is this).
Drain pipe having been fitted incorrectly, ie having a U shape between the dishwasher and the drain - this causes dirty water to sit in the pipe and if it's been done completely wrong, can potentially even wash back into the machine. Most modern machines will have the pipe go up on the back of the machine and then you're supposed to run it level or downwards to the drain, but older ones didn't have this feature and you're meant to put the "high loop" in yourself, when fitting it. If it was fitted by a layperson this might not have happened.
Dishwasher not levelled properly - again can be missed when installing, or if the level has shifted over time e.g. because it wasn't attached to the counters or cupboards, and the momentum of the heavy door opening and closing has affected this, it might not be draining effectively. You can put a spirit level inside it to check whether it's level.
If you've had any of these issues for a while you might also have general build up of gunk and slime in harder to reach parts of the machine which won't be cleared out by the cleaning cycle thing. I would go into it and attack it and see if you can take any bits off e.g. the supporting rails from the upper rack may be removable, and if you have a higher end e.g. Bosch/Siemens, then you can often pull out the whole of the plastic piping thing which transports water from the bottom to the top spinny arm thing.