Fix leak detector causing panics in unit evals (#56029)

Fixed an issue where the leak detector would sometimes cause panics when
running unit evals. Fixed this by matching the tear-down logic that we
use in the `gpui::test` macro

> thread 'tools::evals::edit_file::eval_from_pixels_constructor'
(14336149) panicked at crates/gpui/src/app/entity_map.rs:1116:9:
Exited with leaked handles:
Leaked handle for entity language::buffer::Buffer (EntityId(50v1)):

Release Notes:

- N/A
47ea7de9c8Bennet Bo Fenner committed on 5/7/2026, 10:51:34 AM· committed by GitHubparent7d19e89
4 files changedLine totals unavailable