Android app surrounded by black border/bars

Godot Version

v4.4.1.stable.mono.official [49a5bc7b6]

Question

I have a project that I am building for android, and on some devices it is drawing with a thick black border around it. Is there anyway to fix this?

On the left is the behavior I see one tablet device 1, and phone device 2. And on the right is the behavior I see on phone device 3.

here are my project window stretch settings

I set the center board element scale (using a camera2d + zoom), based on the screen size. That part seems to be correct since the board looks to be scaled correctly with the screen. The top UI element (2x(1) coins tracker), I set OnReady using DisplayServer.GetDisplaySafeArea(), which seems to describe the part of the screen which isn’t surrounded by the black border.

This is to be expected when you use integer scaling. It will only scale by whole number amounts, so if the phone resolution is not very close to a multiple of the base resolution, then you will get black borders.