[vm] Fix use-after-free of isolate_groups_rwlock_ during shutdown.

TEST=ffi/async_void_function_callbacks_test
Bug: https://github.com/dart-lang/sdk/issues/53248
Change-Id: I83370f2725f8b8a6bcd2fa1e5ebea2e11ae9606e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415982
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 1b0cb1f..cf6e2e3 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -565,8 +565,7 @@
                    Dart::UptimeMillis(), name);
     }
     MonitorLocker ml(Isolate::isolate_creation_monitor_);
-    if (!Isolate::creation_enabled_ &&
-        !IsolateGroup::HasApplicationIsolateGroups()) {
+    if (!Isolate::creation_enabled_) {
       ml.Notify();
     }
     if (trace_shutdown) {