Heh, I found the solution.
In fullscreen mode I don't need to change the window size. just a stretch setting. LIke that
if OS.window_fullscreen == false:
OS.set_window_size(resolution_list[current_res_index])
get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_2D, SceneTree.STRETCH_ASPECT_KEEP, resolution_list[current_res_index])
else:
get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_2D, SceneTree.STRETCH_ASPECT_KEEP, resolution_list[current_res_index])