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

image = texture->get_image();
		}
		if (!image.is_valid() && atlas_texture.is_valid()) {
			texture = atlas_texture->get_atlas();
			atlas_rect.size.width = texture->get_width();
			atlas_rect.size.height = texture->get_height();
			atlas_rect.position.x = atlas_texture->get_region().position.x;
			atlas_rect.position.y = atlas_texture->get_region().position.y;
			texture_size.width = atlas_texture->get_region().size.x;
			texture_size.height = atlas_texture->get_region().size.y;
		} else if (image.is_valid()) {
			texture_size.width = texture->get_width();
			texture_size.height = texture->get_height();
		}
		ERR_FAIL_COND(!texture.is_valid());
		ERR_FAIL_COND(p_hotspot.x < 0 || p_hotspot.y < 0);
		ERR_FAIL_COND(texture_size.width > 256 || texture_size.height > 256);
		ERR_FAIL_COND(p_hotspot.x > texture_size.width || p_hotspot.y > texture_size.height);
		image = texture->get_image();
		ERR_FAIL_COND(!image.is_valid());
		UINT image_size = texture_size.width * texture_size.height;
		
		COLORREF *buffer = nullptr;
		BITMAPV5HEADER bi;
		ZeroMemory(&bi, sizeof(bi));
		bi.bV5Size = sizeof(bi);
		bi.bV5Width = texture_size.width;
		bi.bV5Height = -texture_size.height;
		bi.bV5Planes = 1;
		bi.bV5BitCount = 32;