This PR fixes an issue where running `nx e2e <proj>` on Windows does not
kill the underlying dev/preview server when the e2e task ends.
Repro:
1. `npx create-nx-workspace@latest repro --preset=react-monorepo
--e2eTestRunner=playwright --appName=demo`
2. `cd repro && npx nx e2e demo-e2e`
This will leave the preview server running on port `4300`, and you have
to `netstat -ano | findstr :4300` to find the PID and kill it.
https://www.loom.com/share/fcbea53cdff543a98f4d4c8377027ee0
## Current Behavior
Continuous task does not kill the process correctly once discrete task
ends.
## Expected Behavior
Processes are killed correctly once task is done running.
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
Fixes#31235