How to set window size to match resoulution

Keep in mind the bars you’re seeing there are because you’re using a windowed preview mode. Preview mode has black bars even when at a 16:9 resolution because it is hiding the native window titlebar. You can see how it would appear if you hit f11 to fullscreen it.

Separately, if you have “Update resolution” checked, it will not matter what you set your game resolution to, because it will update the resolution to whatever size window there is. This means more or less of your game scene will be shown than what appears in the scene editor.

With that option unchecked, your game scene will stay the same size no matter what (just scale up/down to match the window size). You will have to have bars when using a non 16:9 aspect ratio resolution window, though.