Viewport mouse coords are stretched unless the game is fullscreen. Is this normal?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Wabbitseason

I have a 1920×1080 scene which contains a Viewport node (inside a ViewportContainer) that’s designed to use the left half of the screen. I’ve noticed that unless I run the game in fullscreen mode the mouse coordinates over (inside) the Viewport are stretched – this is especially noticable when I use a test window of 1366×768.

Is there some straightforward way to address this unwanted behavior, or must I calculate the proper mouse coordinates based on the expected and the detected resolution?

If it has of any consequence the ViewportContainer’s stretch property is off (it has only caused visual distortion and its child Viewport’s size was not affected at all). The Viewport’s size is 960×1080.

I’m using the stable, official 3.1.1 version of Godot.