Interestingly enough, I found a WEB site or 2 that talks about this. They say that the ants are ALREADY LIVING in the dishwasher. It's not that they're getting in and out of there. One site says that running through a cycle isn't gonna work. Apparently, they like the 'controlled conditions' of a dishwasher. It's dark, moist, quiet (we know that), and has a food source. The only way to get rid of them is to empty the unit and bait them with, well, killer ant food. Or, I guess, alter the 'conditions' enough inside that they leave. (I don't like this idea because I'd rather be done w/them from inside the unit than have them 'move' to another part of the kitchen/house. They NEVER pay their rent!)
Here ya go. Search the WEB pages I've enclosed for dishwasher and you'll find the readings. My best to ya and hope this helps.