This is an example of fullscreen integer scaling and custom scene switching, it works by placing all scenes inside a new viewport and the game looks as if it were using the 2D stretch mode.
With this approach you can easily add mobile touch controls to your game on top of the black bars or screen borders.