Repository: flutter
Issue: DDS Dart VM lives on after `attach` is exited
Labels: platform-ios,tool,P2,team-ios,triaged-ios

## Steps to Reproduce

<!-- Please tell us exactly how to reproduce the problem you are running into. -->

1. Run flutter app through Xcode
2. Run `flutter attach` in terminal, wait for it to finish
3. Quit the `flutter attach` by pressing `q`
4. Run `flutter attach` again

It should throw an error like this (may not be exactly the same depending on what branch you're on):
```
There are multiple Dart VM Services available.
Rerun this command with one of the following passed in as the app-id and device-vmservice-port:

  flutter attach --app-id "com.example.my_app" --device-vmservice-port xxxxx
  flutter attach --app-id "com.example.my_app (2)" --device-vmservice-port xxxxx
```
I believe the issue is that when `flutter attach` is exited, the Dart Developer Service it creates continues to run until the app is killed (for example, by stopping in Xcode).

Notes:
Here's a good place to start (where the creation of the DDD is started):
https://github.com/flutter/flutter/blob/59d80dc8766865ac0fe57478b562e34e1933d02c/packages/flutter_tools/lib/src/resident_runner.dart#L296-L303

## Logs

<details>
<summary>Logs</summary>

```
[!] Flutter (Channel master, 3.7.0-30.0.pre.8, on macOS 13.2 22D49 darwin-arm64, locale en)
    • Flutter version 3.7.0-30.0.pre.8 on channel master at xxx
    ! Upstream repository xxx is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to xxx to dismiss this error.
    • Framework revision 530c3f2d13 (9 hours ago), 2023-01-30 10:19:14 +0000
    • Engine revision a7bb0e4108
    • Dart version 3.0.0 (build 3.0.0-179.0.dev)
    • DevTools version 2.20.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly
      to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at xxx
    • Platform android-33, build-tools 33.0.0
    • ANDROID_SDK_ROOT = xxx
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.74.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.58.0

[✓] Connected device (4 available)
   xxx

[✓] HTTP Host Availability
    • All required HTTP hosts are available
```

</details>