При открытии модалки оборачиваем <div class="ui-dialog"></div> в <div class="ui-dialog-wrapper"></div>, для которого задаем через стили фиксированную позицию и выравнивание через "display: flex".
А при закрытии окна удаляем этот див.
.ui-dialog-wrapper {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
.ui-dialog {
position: fixed !important;
top: auto !important;
left: auto !important;
z-index: 1000;
padding: 0;
border: none !important;
background: #fff;
border-radius: 0;
box-sizing: border-box;
font-size: inherit;
font-family: inherit;
// transform: translateX(-50%) translateY(calc(-50% - .5px)) translateZ(0);
// transform: translateX(-50.09%) translateY(calc(-50.09% - .5px)) translateZ(0);
// backface-visibility: hidden;
@include max-screen(991px) {
width: 100% !important;
height: 100% !important;
max-height: 100%;
overflow: auto;
}
}