Happens on both LinkedIn and Instagram, never actually checked what causes it...
Wouldn't be surprised if it's some click event listener firing off a synchronous xhr telemetry request when you close the popup, which freezes the main thread long enough to make the browser think you've selected some text