My QHY8 (a dedicated astro CCD) for example has a poor/old design, where the CCD compartment is not air-tight. This allows humid air to get inside, which can then fog up the optical glass due to the peltier cooling the sensor down.
The fix is a small ring that screws into the port, and raises the temperature just enough to combat dew. You could also wrap a dew heater strap around the part of the optical train at that point for a similar effect.
Dew (and frost) are the astrophotographer's great, persistent enemy and not just on the CCD. You'll also have dew problems on the telescope itself. For example, my newtonian sometimes has dew problems on the secondary mirror, occasionally on the main mirror, and always on my guide scope.
Most people just create some DIY dew heater straps with nichrome wire... it's super simple and effective.