This is how I could set it up:
- Project Settings -> General -> Display -> Window -> Size: Width=64, Height=64
- Project Settings -> General -> Display -> Window -> Stretch: Mode=viewport, Aspect=keep
- Add OS.window_size = Vector2(640,640) to in a _ready function of your main scene.
The last step probably could be done in a more sophisticated way, though it works well like this. Result: