As you know, when you have a button set to 'grab', it is in reality set to 'shield+attack' and performs both inputs on the same frame. And under conditions that do not allow you to shield but allows you to attack (while jumping or attacking, or the first frame of a dash), or conditions that allow you to shield but does not allow you to attack (holding grab before the buffer window, mainly), one of the inputs will be ignored. We abuse this often by charging C-stick smashes with the Z button on a gamecube pad, in example, but you are not the first one to face the issues that come with it :
-If you are holding the grab button while in the middle of a move or a dodge, but start holding it more than 10 frames before this move ends, then the A input will be ignored because attack inputs have a 10 frames buffer windows which shields aren't bound to : you end up shielding instead of grabbing. This happens when you want your grab to come out on the earliest frame possible, but are too hasty. To fix it, either mash the grab button instead of holding it, or hold the shield (or grab) button while simultaneously mashing the attack button. You can, of course, also try to press the grab button during the buffer window. The timing isn't hard to get at all.
-If you have the above issue and happen to press back or forward (probably to throw your opponent after the grab that should have come out but turned out to be a shield, or in an attempt to buffer a dash grab after a move), since the attack input is being ignored, you will perform a sidestep. To the console, you are basically holding shield and pressing a direction. Use the fix for the first problem, and you'll fix both.
-An issue you haven't been having, is performing a fsmash instead of a dash grabs. When you press dash, shield and attack on the same frame, the shield input will be ignored for some reason, and you'll perform a smash. To fix it, make sure you are cascading the inputs with at least 1 frame of delay. Always good to point out.