Have you figured it out?
I have a similar problem with HIDDEN, but a bit more complicated. The following lines are not exactly in the same order they are in my script (they are in different functions) but in the order they are run while playing:
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
#gameplay
#pressing pause
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
#move mouse manually or by script, it becomes visible
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
#gameplay
#pressing pause
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
#cursor seen not immediately but as soon as mouse moved
but:
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
#gameplay
#pressing pause
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
#don't move mouse
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
#gameplay
#pressing pause
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
#cursor not seen until moved out of game window
So the problem seems to be with mouse mode in general.
I fixed it temporary with warp_mouse_position function added after every time I make it visible, but I don't like this solution.
How are you making it confined AND hidden? Because with confined mode cursor is shown. Maybe for your case you should use captured?
Also, I tried making it confined right before visible, like this (I don't use mouse in my gameplay):
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
#gameplay
#pressing pause
Input.set_mouse_mode(Input.MOUSE_MODE_CONFINED)
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
#cursor shows literally immediately
It works, but I'm still looking for a better solution.
However, in HIDDEN mode cursor can be moved out of window