See browsers scales to fit in window keeping aspect ratio, here 2*Firefox (space up, next sides)
Project Settings->Window->ViewPort:Width=1024,576
aspect=keep (16:9), Orientation=Landscape
Godot4.5.1, Export->Web->Options:Resize=Adaptive
(if you solve it, good screenshot, than try same as me to help others in godot 4+)