sidebar: Fix focus movement while toggling it on and off (#53283)

I was testing out the changes in
https://github.com/zed-industries/zed/pull/52730 and realized that the
agent panel, when full screen, would be auto-dismissed if I toggled the
sidebar off. Turns out this happens because we were "hard-coding" the
focus back to the center pane, which was automatically dismissing zoomed
items. So, in this PR, I essentially am copying the ModalLayer approach
of storing whatever was focused before so we can return focus back to it
if possible.

Release Notes:

- N/A
a856093ccaDanilo Leal committed on 4/7/2026, 2:51:46 PM· committed by GitHubparent3ed1c32
1 file changedLine totals unavailable