text: Title: Deadlock when spawning tasks from a function and limiting concurrency
  Body: ### Bug summary
  
  I'm getting what seems to be a deadlock when I have Python functions that aren't tasks "spawning" new tasks (and limiting concurrency). At some point Prefect is just waiting on a bunch of futures but no new tasks get started.
  
  Here's a simple reproduction of the issue:
  
  ```python
  """
  Example flow that demonstrates task nesting patterns in a ThreadPoolTaskRunner context.
  Each parent task spawns multiple child tasks, which can lead to resource contention.
  """
  
  from random import random
  from time import sleep
  
  from prefect import flow, task
  from prefect.task_runners import ThreadPoolTaskRunner
  
  
  @task
  def dependent_task(n: int) -> int:
      """Child task that simulates work with a random delay.
      Returns the input number unchanged."""
      sleep_time = random() * 3
      print(f"Dependent task {n} sleeping for {sleep_time:.2f}s")
      sleep(sleep_time)
      return n
  
  
  def task_spawner(n: int) -> list[int]:
      """Creates 5 identical child tasks for a given number n.
      Returns the collected results as a list."""
      dependent_futures = dependent_task.map([n] * 5)
      return dependent_futures.result()
  
  
  @task
  def initial_task(n: int) -> list[int]:
      """Parent task that adds its own delay before spawning child tasks.
      Returns a list of results from child tasks."""
      sleep_time = random() * 2
      print(f"Initial task {n} sleeping for {sleep_time:.2f}s")
      sleep(sleep_time)
      return task_spawner(n)
  
  
  @flow(task_runner=ThreadPoolTaskRunner(max_workers=10))
  def deadlock_example_flow() -> None:
      """
      Creates a workflow where 10 parent tasks each spawn 5 child tasks (50 total tasks)
      using a thread pool limited to 10 workers. Tasks execute concurrently within
      these constraints.
  
      The flow demonstrates how task dependencies and thread pool limitations interact,
      though "deadlock" is a misnomer as the tasks will eventually complete given
      sufficient time.
      """
      # Create 10 parent tasks
      initial_futures = initial_task.map(range(10))
  
      # Collect results from all task chains
      results = [f.result() for f in initial_futures]
      print(f"Flow complete with results: {results}")
  ```
  
  Thanks a bunch!
  
  ### Version info
  
  ```Text
  (crosswise-ai) [02/07/2025 04:58:22PM] [thomas:~/crosswise/crosswise_app]$ prefect version
  Version:             3.1.12
  API version:         0.8.4
  Python version:      3.12.7
  Git commit:          e299e5a7
  Built:               Thu, Jan 9, 2025 10:09 AM
  OS/Arch:             linux/x86_64
  Profile:             ephemeral
  Server type:         cloud
  Pydantic version:    2.9.2
  Integrations:
    prefect-aws:       0.5.3
  ```
  
  ### Additional context
  
  _No response_