change the way outside click deselection is prevented in Shadow DOM