### Issue Link:
https://github.com/dart-lang/sdk/issues/60851
### Changelog Description:
Fixes unhandled exception on application shutdown in the debug adapter used by IDEs.
### Impact Description:
The Debug Adapter (DAP) could crash if it is waiting on specific RPCs from a target application while the application is shutting down.
### Workaround:
None.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
This bug is extremely hard to reproduce reliably. Catching `RPCError` and checking for the correct error code related to the VM service disappearing is simple and low risk.