Clicking on a class element to display a pop-up modal (configured w/ CMS) makes the pop-up modal glitch and spazz out

Under ‘Community page’ in the website I’m building, I have each ‘pill’ and pop-up modal mapped to a CMS. Everytime you click on a pill, the corresponding child pop-up wrapper should appeara ‘show’ class is added to the hidden pop-up-wrapper class.

It used to work perfectly fine, but just a few days ago (since the webflow update) clicking on a pill would make the entire screen flash between displaying pop-up modal and hiding it, and it glitches out. Only when the cursor is out of the website screen (i.e. browser window), it stops.

I set the wrapper Z to 1000, and am wondering if anyone can help out with this issue? I don’t think it’s a code related issue, but I did append it below –

 function showPopup(child) {
  // ADD SHOW CLASS
  let popUpWrapper = child.querySelector('.popup-wrapper');
  console.log("ADD CLASS SHOW", popUpWrapper);
  popUpWrapper.classList.add('show');
  console.log("ADD CLASS SHOW", popUpWrapper);

   let overlayPopUp = child.querySelector('.overlay-pop-up')
  	overlayPopUp.addEventListener('click', function(event) {
  // REMOVE SHOW CLASS FROM OVERLAY POPUP
  	console.log('REMOVE CLASS SHOW');
    console.log(popUpWrapper); // Check if popUpWrapper is referencing the correct element

    popUpWrapper.classList.remove('show');
    console.log(popUpWrapper); // Check if popUpWrapper is referencing the correct element
		event.stopPropagation();
	});
 
}```


----------
Here is my [site Read-Only](https://preview.webflow.com/preview/tcsc-site?utm_medium=preview_link&utm_source=designer&utm_content=tcsc-site&preview=3808a2313aa6cface18d1ef58e76e9b7&workflow=preview)