I've previously tried setting the background/occluded window flags as suggested here:
https://github.com/teamcapybara/capybara/issues/2800#issuecomment-2750363862, but this made no difference for me. Today I've picked up a bunch of additional flags (including the occluded ones again) from
https://github.com/Lombiq/UI-Testing-Toolbox/blob/23f4312d65169a8c84cc16765765d541c0058fc7/Lombiq.Tests.UI/Services/WebDriverFactory.cs#L153 as per your suggestion, but that hasn't made any difference either unfortunately.
Just to be clear, I'm seeing these stale element exceptions in both headless and normal mode, when running a single test case, or when running multiple tests in parallel or sequential mode. I can therefore see that there are no unsafe password warnings or any other type of popups/dimming etc occurring at the time of the stale element exceptions. Accordingly, I have not tried the unsafe password flags you mentioned.
Our application that is coded using JSP was previously our most stable application in terms of automation, but has been by far the most effected by this issue. It performs frequent POSTs back to the server and this is where I'm seeing most of the flakiness. I haven't found any flags that improve this behaviour. We have other applications that communicate with the server less frequently via API/webservice calls and these applications are less effected, though not completely immune (flakiness occurring around page loads, for example, despite waiting for the document ready state to be complete and elements to be present/clickable).
So it still appears to me to be a change in behaviour in Chrome v134 that is returning control to the driver before navigations are complete. Thus far, rolling back to Chrome v128 has been the only "solution" that works for me. And I find it interesting that rolling back to Chrome/chromedriver v132 and v130 still exhibits the stale element exceptions of v134, even though those versions previously worked. I run on Windows platforms, and I'm wondering if v134 has made changes to the Chrome settings in the Windows registry or something??? That would imply that the changes to Chrome were implemented around v130, but were not enabled prior to v134. But that's just wild speculation at this point.