Back in the 1940s, it was common to cover gun ports with tape. As well as improving streamlining, it would presumably help keep them clean.
Spitfire Mk 1, with all eight .303 inch Browning machine guns covered (source)
I suggest it would be fairly straightforward to design a fairing that would immediately disintegrate if the gun were to be actually fired; but, while not in use, prevent ingress from anything unwanted, and provide a small boost to aerodynamic efficiency.
M-61A1 cannon mounted on the F15 Eagle (source)
F-16 M61 Vulcan 20 mm cannon gun port (source)
It's not like these guns are getting regular use. A fairing would seem to deliver a benefit at little cost. What is the reason they're not more common?