Otherwise, try switching the Tilde Action setting in the preferences from ‘Navigate’ to ‘Gizmos’. In addition, there is a tick box on the keymap tab of the Properties window to enable a few keys to have “secondary actions” one of the keys it affects is the Tilde [`] allowing it to control your gizmos.
Replied in the Q&A but without changing the source code to blender @Capricas_Kirito’s option is the best you have.
I find it just as easy to use the shortcut keys and press the axis keys afterwards which highlight which axis you are moving,rotating or scaling on in any case.
As when you hit G you are already moving the object the widget isnt possible as blender just is not achieveable as far as i can tell.