Iv noticed for awhile that sometimes when I toggled the grid snap on and off and then switched between the transform gizmo (using the spacebar) grid snapping would toggle back, I thought this was me going insane or just misclicking but I realized today that tapping the space bar toggles options you had previously/currently selected. I cant seem to find away to turn this off, it doesn’t come up on the keyboard shortcut menu. It should be on the menu surely?
The reason that you are experiencing this behavior is because after clicking to toggle grid snapping on or off, your focus is still on that button. Then, when you are pressing the space bar, it is toggling the grid snapping as well as toggling the transform gizmo of the object you have select. Try clicking off into the viewport after you click to toggle grid snapping. Once I did this, pressing the space bar no longer toggled the grid snapping option.
Yeah I know that but why cant I map that toggle to a different key?
You can map the Grid Snap toggle to a different key if you go to Edit->Editor Preferences-> Keyboard Shortcuts and then search for Snap in the search bar. The option for Grid Snap is under the Common Viewport Commands tab. However, if you toggle grid snap and then press space before clicking on another object, the toggle will still occur because that button is in focus.
Also, there are hotkeys for toggling through the various snaps, so if you would prefer to use those, W for Translate, E for Rotate, R for Scale, then this would also prevent the grid snap from toggling when it is in focus.
In terms of the space bar toggling the option when it is in focus, this is an intended functionality that is programmed into the widgets. When a widget is in focus (in this case, the grid snap toggle button), the space bar essentially counts as a mouse click. As this is an intended feature, this option is not something that you can set to a different key.