Selenium is simply an automation tool. You should check with the browser provider to confirm whether they support it.
If you are using Chromium, detecting an open CDP connection is quite easy. With Chromium and other browsers, detection can also be done by comparing fingerprints between the main frame and web workers, along with checks like WebRTC leaks, browser kernel mismatches, and other signals.
For better protection, you can use an anti detection browser. It will involve some cost, but offers much stronger security.
If you prefer a free option, you can try Camoufox. It is not as secure as premium solutions, but still significantly better than using Chromium or Puppeteer or Playwright with stealth.