Here is my kinda glitchy solution:
extends Node
const RATIO = 600.0 / 1024.0
func _ready():
get_tree().get_root().connect("size_changed", self, "set_window_aspect_ratio")
func set_window_aspect_ratio():
OS.window_size = Vector2(OS.window_size.x, OS.window_size.x * RATIO)
If you find a better solution please let me know!