Iphone x leaving white space on top

If StatusBarOverlaysWebView set to false It leaves white space on top of iphone x and
If StatusBarOverlaysWebView set to true it overlaps top bar in other iphone.