Решение -
https://github.com/zhetengbiji/safeAreaInsets + после загрузки пушить переменную из локал сторадж
if(safeAreaInsets.support && safeAreaInsets.top !== 0) {
localStorage.setItem('safe-area-inset-top', safeAreaInsets.top);
}
if(safeAreaInsets.support && safeAreaInsets.bottom !== 0) {
localStorage.setItem('safe-area-inset-bottom', safeAreaInsets.bottom);
}
if(localStorage.getItem('safe-area-inset-top') > 0) {
document.documentElement.style.setProperty('--sat', localStorage.getItem('safe-area-inset-top') + "px");
}
if(localStorage.getItem('safe-area-inset-bottom') > 0) {
document.documentElement.style.setProperty('--sab', localStorage.getItem('safe-area-inset-bottom') + "px");
}