Example scenario (from cpp test):
The coordinator gets stored in the function object during commit, promises gets fulfilled, the main test gets unblocked here, coordinator gets removed from catalog and when the CoordinatorService tries to join, it will see that there are no coordinator in the catalog, and then it will still trigger the _quiesced invariant because one of the txnCoordinator shared_ptr is still alive in the function object call back inside the PromiseFuture.
Probably very unlikely to happen in an actual mongod process since it takes a long time before a node would transition to primary after becoming a secondary.