### Godot version

4.0

### System information

Windows 11

### Issue description

So on my monitor with 2560x1440 resolution retrieved by the `DisplayServer.get_window_size` method shows 2562x1442, which I think is incorrect. A similar result returned by `get_viewport().size`. But it's become correct if the `Resizable` property is turned on.

![image](https://user-images.githubusercontent.com/3036176/212492776-5c09b12e-d25a-4951-8392-54f5a5e3bece.png)


### Steps to reproduce

Create the project, add a label to observe the resolution text, set the full-screen mode in the project settings, toggle off the `Resizable` property, and run the project.

### Minimal reproduction project

[TestResolution.zip](https://github.com/godotengine/godot/files/10418682/TestResolution.zip)

Key modifiers = p_keycode & KeyModifierMask::MODIFIER_MASK;
	Key keycode_no_mod = (Key)(p_keycode & KeyModifierMask::CODE_MASK);
	if (keycode_no_mod == Key::PRINT ||
			keycode_no_mod == Key::KP_ADD ||
			keycode_no_mod == Key::KP_5 ||
			(keycode_no_mod >= Key::KEY_0 && keycode_no_mod <= Key::KEY_9)) {
		return p_keycode;
	}
	unsigned int scancode = KeyMappingWindows::get_scancode(keycode_no_mod);
	if (scancode == 0) {
		return p_keycode;
	}
	HKL current_layout = GetKeyboardLayout(0);
	UINT vk = MapVirtualKeyEx(scancode, MAPVK_VSC_TO_VK, current_layout);
	if (vk == 0) {
		return p_keycode;
	}
	UINT char_code = MapVirtualKeyEx(vk, MAPVK_VK_TO_CHAR, current_layout) & 0x7FFF;
	
	
	if (char_code >= 32 && char_code <= 127) {
		
		if (char_code == (unsigned int)Key::BRACKETLEFT || char_code == (unsigned int)Key::BRACKETRIGHT) {
			char_code += 32;
		}
		return (Key)(char_code | (unsigned int)modifiers);
	}
	return (Key)(KeyMappingWindows::get_keysym(vk) | modifiers);
}
String _get_full_layout_name_from_registry(HKL p_layout) {