Grip Fighting is just trying to get a more advantageous set of grips than your opponent. The general rule is to prevent your opponent setting their grips and set your own. However, getting distracted by grips to the point you’re only grip fighting is pointless.
It is often better to do something that forces your opponent to let go of the grips on their own then try to break them. Go for a choke, attempt a sweep, anything that means they have to let go and defend/post breaks the grip. Otherwise shaking, lots of rapid little movements, is generally better than one big move your opponent can anticipate.
If you’re not doing anything with your own grip don’t fight to keep it, it’s a waste of energy. If you do plan on doing something with the grip, do it. Don’t grip super tight, and always keep slack in the arm making the grip. This way you don’t get as tired, and you have time to react and grip hard when they make a move to break your grip.