Scrolls and interactions in modals


So, I’m currently doing a modal in my site, but I’m having some issues. Mainly, I can seem to get it to scroll the modal regardless of where the mouse is on the site while exiting the modal when I click on the background. I can however get one of them to work at a time, so it gets kind of confusing. Is there any way I can get both these things to work at once?

Thanks for your time,
Luís Henrique

This would be the button to open the modal. If it doesn’t work on preview, I can upload a publish link here!

Here is the site with the modal activated, at the moment you can’t scroll while your mouse is not on the image: LINK