Input, pause, and widget focus


In my game there is a weapon that gets charged up when you press (and hold) a button, and fires when you release it.
But when you pause the game, a widget appears and it gets focused (so you can control it). Doing so releases the input if it is set to execute while paused.
If the widget doesn’t get focus you can’t control it, but the input doesn’t get released. (I kinda need the pause menu though)
If the charge attack input doesn’t execute during pause, then the player can release the button during pause, resume the game and the game doesn’t know the input was released. (which creates a whole bunch of other issues)

The ideal case would be to be able to hold the button, pause the game, focus the widget, come back, and depending of whereas the button is pressed, keep charging or release the attack. But given the conditions i’m presented with… i have no idea how to solve this. help (?)