Dusted off Godot to test something out and this seems to disable the mouse completely, without needing to write any code. Setting Filter to Ignore and Behavior Recursive to Disabled in the Control nodes inspector like so.

This option will apply to your currently selected Control node and it’s children. If the game switches to a different scene, it may not have this option set and so the mouse would work.
Although you could do this for a fullscreen transparent rectangle, and then set it’s filter to block, so that it will always block all control nodes behind it. If the rectangle was a global then it would block input in all scenes.