I know this is an old post, but I've been trying to get this to work and struggled using the project settings.
To get it to work for me, with a background of 1080 x 1920 in portrait mode, I did the following:
In Project settings/Display/Window - width = 540 Height = 960
Add a script to the base node (if you don't have one).
_ready() function add the line:
This is setting the shrink value in the display settings to .5, which you can't do in the editor (well not in 3.2.1)
UPDATE: I posted on the Godot features forum and some said, so it like this:
In settings, under Display/Window:
Test Width: 540
Test Height: 960