text: Title: Functions called in threads marked as missing in coverage report
  Body: # Summary
  I am testing a function which runs code in a thread. All lines in that function are marked as `missing` in the coverage report in Windows and Linux. 
  
  ## Expected vs actual result
  Expected behaviour is that functions called in threads are not marked as `missing` in the coverage report, actual result is that they are.
  
  # Reproducer
  Here is a minimal example:
  
  ```python
  # root_dir/my_file.py
  import _thread as thread
  from time import sleep
  
  def foo(arr: list):
      arr.append(1)
  
  
  def bar():
      arr = []
      val = thread.start_new_thread(foo, (arr,))
      sleep(5)
      return arr
  ```
  
  ```python
  from my_file import bar
  
  def test_bar():
      arr = bar()
      assert 1 in arr
  ```
  
  The test passes, but the contents of `foo` are marked as `missing` in the coverage report. 
  
  ## Versions
  
  `python==3.11.4`
  `pytest==8.3.2`
  `pytest-cov==5.0.0`
  
  ## Config
  
  My `pyproject.toml` looks like this:
  
  ```toml
  [tool.coverage.run]
  source = ["root_dir"]
  branch = false
  concurrency = ["thread"]
  
  [tool.coverage.report]
  sort = "cover"
  fail_under = 30
  show_missing = true
  skip_covered = true
  exclude_lines = [
      "pragma: no cover",
      "if __name__ == \"__main__\":",
      "@abstractmethod",
      "if TYPE_CHECKING:",
  ]
  ```