There is a position that is so bad that if you are put there, no matter how good your striking skills are, you should abandon them and focus on escaping using your grappling skills. That awful position can vary from person to person. For me, if I am caught in the rear mount, it is a good time to forget about trying to hit and time to switch on the grappling escape mode.
The more skill you have, the better you will know when to hit and when to escape. The more you know your “bad positions” the better you will be at avoiding them and not panicking and flailing when you get stuck in them.
Hit. Grapple. Mix them together.