Chrome iPhone orientation error

I am using Cocos Creator 3.3.2
My game is running on iPhoneX Chrome browser 99.0.48.44.59

The game run within an iFrame.

After few orientation changes the game suddenly reduced to a different size.

window.innerWidth ,  window.innerHeight

document.documentElement.clientWidth ,document.documentElement.clientHeight

window.visualViewport.width , window.visualViewport.height

All report incorrect values.

The game works perfectly on the same iFrame on Safari browser.

You can get the built-in screen or resolution of cocos to solve your problem

What values are you getting?

@SonarSystems for few rotations width and height get the correct values.

Then they start getting incorrect values.
This causes the game to change the screen size to incorrect one.

Is there a publicly available website with iFrame to check this?

Not that I know of but you could create one.