Unfortunately, the antenna is on the rear hatch glass (looks like part of the defroster, but is actually the antenna). I have experienced the same issue, and keeping the back glass clean helps tremendously. Since I garage my CX-9, even after washing it, it has crazy dust buildup all over the back glass just in 1 day from the dust in the garage...so I try to keep up with it with glass cleaner regularly. I try not to clean the inside of the glass as often in order to prevent pre-mature corrosion to the antenna and defroster.
The only other fix is to drop the rear of the headliner, drill a hole in the roof and mount yourself a Fuba style antenna...since some of the Mazdas used to have them (I don't think any do anymore) you could get one of those, or one for a VW or Toyota...they all pretty much mount the same way...you would just have to rig your own splicing together.