You stop it by not getting into that position in the first place. What you’re saying is a line of thinking myself and most other people fall into, not just in FAF but in general. You’re in a situation and it feels bad because you can’t counter or deal with that situation well. You think “well if this is happening, how do I counter it?” Your mistake happened before that situation started. What you should be asking is “how can I not get into this situation in the first place.” That’s not helpful for when you’re already in that position, but it’s helpful for not getting in that position in the first place in the future.
So how do you avoid another faction doing a gun com or pd creep into your base as Cybran? Well PD creep has an easy and direct counter, especially as Cybran. Make MML. Cybran MMLs are hard to counter for any faction other than Aeon because the missiles split after being hit once.
The gun com one is more interesting because it goes back to my previous point about avoiding the situation in the first place. If you’re constantly raiding and destabilizing your opponent it’s going to be much harder for them to amass a large enough force for them to feel comfortable pushing you hard. You can constantly hold the threat of Corsair snipe over them keeping them from wanting to push in too far with their com. Force them to leave their com more exposed with stealth raids using a mobile stealth field, a rhino or two, and a couple Medusas. They have to move either their com or some units to intercept or you can do a lot of dmg if you handle those raiding groups well. Either way it slows them down and keeps them on the defensive, which is fundamentally what you want as any faction, but especially as Cybran. As Cybran you also have the best tools to do that with. Stealth, fast t1 tanks, and good anti unit t1 arty is a nice combo for raiding at virtually all stages of the game.