I always clean my filter only when I do water change. I keep the old water and squeeze the sponge in it couple of times and rinse the ceramic rings in the same water too. You sure might lose some B.B, but in my opinion it is the safest option if it needs to be done
When my aquarium is newly establish and when I clean filter media I just put dose or two of bacteria starter like easy start directly in filter foam after I clean it and I didnt have problems with it for now.
The beneficial bacteria is living on all the surfaces inside the tank, not just in the filter media. When you perform a water change, then that's the best time to service the filter. Clean it thoroughly in some of the old tank water and put it back in the tank. You'll lose a bit of the bacteria, but it will reproduce what's lost in a few hours.