NecrosisWindow size not fully 1920x1080

Im following a tutorial and my current resolution is ‘1918x1078’ which it should be ‘1920x1080’. I am not sure why but this is my code:

extends OptionButton

@onready var resolutionBtn = get_node("..//resolutionBtn")
@onready var fullscreenBtn = get_node("..//fullscreenBtn")

var Resolutions: Dictionary = {
    "3840x2160":Vector2i(3840, 2160),
    "2560x1440":Vector2i(2560, 1440),
    "1920x1080":Vector2i(1920, 1080),
    "1366x768":Vector2i(1366, 768),
    "1280x720":Vector2i(1280, 720),
    "1440x900":Vector2i(1440, 900),
    "1024x600":Vector2i(1024, 600),
    "800x600":Vector2i(800, 600)
}

func _ready():
    addResolutions()
    checkVariables()
    
func checkVariables():
    var _window = get_window()
    var mode = _window.get_mode()
    
    if mode == Window.MODE_FULLSCREEN:
        fullscreenBtn.set_pressed_no_signal(true)
    
    
func addResolutions():
    var currentResolution = get_window().get_size()
    var ID = 0
    
    for r in Resolutions:
        resolutionBtn.add_item(r, ID)
        
        print(str(currentResolution))
        if Resolutions[r] == currentResolution:
            resolutionBtn.select(ID)
        
        ID += 1

func _on_item_selected(index):
    var itemID = resolutionBtn.get_item_text(index)
    get_window().set_size(Resolutions[itemID])
    Center_Window()
    
func Center_Window():
    var Center_Screen = DisplayServer.screen_get_position()+DisplayServer.screen_get_size()/2
    var Window_Size = get_window().get_size_with_decorations()
    get_window().set_position(Center_Screen-Window_Size/2)

func _on_fullscreen_btn_toggled(toggled_on):
    if toggled_on:
        get_window().set_mode(Window.MODE_FULLSCREEN)
    else:
        get_window().set_mode(Window.MODE_WINDOWED)

Is there a reason why?


Because Window.MODE_FULLSCREEN has 1 pixel border on Windows. It’s explained in the documentation.