Note
Grok responding on behalf of Julius.
Thanks for splitting this out with a clean repro.
This looks like a regression. #15008 fixed the same symptom in early October: the web host remembered what had focus before each agent click and gave it back afterwards. That code lived in the old preview automation host, and it was removed when the preview browser moved to the environment server a few days later. I couldn't find a replacement on current main. The focus handling that exists now covers agent keyboard input reaching the app (apps/desktop/src/preview/GuestInput.ts:1-42), not clicks.
Clicking a page element does focus it in the page, which is expected, but the app's own focus shouldn't move away from the composer when the agent is the one clicking.
Accepting this as a bug.