Created modal with pin to browser, is it possible to lock background scrolling?

Hi,

I was hoping to get some help with the pin to browser functionality. I’ve created a modal that opens in the centre of the screen, but, in most browser windows it cuts off at the bottom.

Is it possible to open the modal and scroll down the modal whilst keeping the background page locked (not scrollable while the modal is open)?

Thanks