### 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)

POINT coords;
				coords.x = mb->get_position().x;
				coords.y = mb->get_position().y;
				ScreenToClient(hWnd, &coords);
				mb->set_position(Vector2(coords.x, coords.y));
			}
			mb->set_global_position(mb->get_position());
			Input::get_singleton()->parse_input_event(mb);
			if (mb->is_pressed() && mb->get_button_index() >= MouseButton::WHEEL_UP && mb->get_button_index() <= MouseButton::WHEEL_RIGHT) {
				
				Ref<InputEventMouseButton> mbd = mb->duplicate();
				mbd->set_window_id(window_id);
				last_button_state.clear_flag(mouse_button_to_mask(mbd->get_button_index()));
				mbd->set_button_mask(last_button_state);
				mbd->set_pressed(false);
				Input::get_singleton()->parse_input_event(mbd);
			}
		} break;
		case WM_WINDOWPOSCHANGED: {
			Rect2i window_client_rect;
			Rect2i window_rect;
			{
				RECT rect;
				GetClientRect(hWnd, &rect);
				ClientToScreen(hWnd, (POINT *)&rect.left);
				ClientToScreen(hWnd, (POINT *)&rect.right);
				window_client_rect = Rect2i(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
				window_client_rect.position -= _get_screens_origin();
				RECT wrect;