Phaser RESIZE Scale mode not resizing the game on mobile

I had minimal html markup for a web game which used RESIZE scale mode as following

The game was started with the following statement

code of Boot class

When the game was loaded initially on mobile, it took the available space on the mobile screen for that orientation but turning the mobile device to other orientation did not correctly fit in the available space. Initially it looked like an issue with the width and height values received by the resize method of the game state as it was taking the correct width of the device but the height was proportaionate to game size in previous orientation. There was no other css applied to the div ids. When I checked width and height of “game-container”, it was also¬†showing incorrect width and height for the available screen space. It looked like width was seen correctly but height was calculated[…]