Are you clicking a link and that opens a new tab/pop-up. If so check the element you are selecting if it has a attribute called target=_blank
if it has then you can just remove that attribute by using this
js
cy.get('yourselector').invoke('removeAttr', 'target').click()