In testing the new headless mode for Edge/Chrome, discovered that using it causes a "sync your profile" popup in Edge (not Chrome). So for now kept the default old headless mode for Edge specifically. Will need to address this before Selenium 4.10, when the old headless mode is planned to be deprecated.
After some more experimentation, I determined that the issue is a side-effect from a bug in the way new capabilities specified at runtime were being merged with preloaded capabilities. Fixed in v3.9.
In testing the new headless mode for Edge/Chrome, discovered that using it causes a "sync your profile" popup in Edge (not Chrome). So for now kept the default old headless mode for Edge specifically. Will need to address this before Selenium 4.10, when the old headless mode is planned to be deprecated.