I have been told not to change my grip, but it was not from anyone who really mattered.
I have seen footage of an old educational video of JO Waldner showing how he changes his grip for forehand and backhand. I think that trumps anything anyone else has told me. But, this is how it works for me. I remember when I used to skateboard and when you are doing it for a long time, you just adjust your feet to the right place for the next trick you are going to do. It happens naturally. You don't try and you don't really do it consciously. With table tennis, something similar happens to me. When I cock my wrist for my backhand, it changes the grip to a slightly different angle. This is forced by the wrist position, and it helps me get more spin on the shot as I close the face of my racket so I can spin over the ball. When I turn open for the forehand and my wrist takes my blade into position for the shot, my grip has to switch so I can get my blade face closed and my wrist back so that there is one line from my elbow, through my arm, to the tip of the blade. To get my wrist in that position I have to change the grip a little.
To use anatomical terms, for the backhand my wrist is deeply flexed and moderately adducted and for the forehand my wrist is deeply abducted (the opposite of adducted) and can be flexed, neutral or extended, depending on what spin I want to put on the ball (side spin, no side spin, inside out sidespin) or if I want to use the wrist snap more to put more pace on the ball. I am not thinking about this when I do it. It just happens naturally. But, that is an analytical analysis of what happens.
So I would not stop it from shifting, but let your body tell you how to switch it rather than trying to do it as an intellectual process. At least, that is how I feel about it.