Hi,Welcome to Just Answer, My name is XXXXX XXXXX forward to helping you today.
its a hard water problem, its not actually the dish washer itself, in some cases a water softener is required to remedy the issue. you can try running vinegar through a wash cycle a couple of time to break up the hard water film in the machine itself. just pour a bottle in the bottom after it fills and rune the cycle with no dishes, if that doesn't work you need a water softener either whole house or in line to the dish washer.
OK, but we've NEVER had a hard water problem. The cloudy glassware problem developed after 5 years of regular use, with no complaints about cleanliness. Could the problem be accumulated salts from detergent?
(I realized that I didn't indicate make/model of the dishwasher correctly. It's a Bosch SHX46A05UC/21 - if that gives you more insight.)