Add confirm upon release event to a custom shortcut
I now understand I've been overthinking this while the solution is simply to set spacebar for panning both in 2D view and 3D view.
For some reason I thought in the 3D view/pan view window I needed to set mouse movement, then spacebar as a modifier and then in the view3D Move Modal section in the bottom also set confirm: spacebar: release to make it work the right way (see image with my overcomplicated setup) It did work but was unnecessary complicated and could not be applied for 2D view.