Fix local task dropped on the wrong thread (#28290)

Release Notes:

- Fixed a panic during shutdown of the remote server
9e8afa8daaConrad Irwin committed on 4/8/2025, 5:54:51 PM· committed by GitHubparent698cdc4
2 files changedLine totals unavailable