Version
1.56.1
Steps to reproduce
To reproduce you just need to activate the "retain-on-failure" trace option and run tests. We have 4 workers and 972 tests. Here's some screenshots of the drive when the pipeline is running our tests:
Before the pipeline run:

10 minutes in:

20 minutes in:

Expected behavior
Traces for successful tests should be cleaned up immediately after each test completes successfully, rather than waiting until the end of the entire run. This would prevent disk space accumulation during long test runs.
Actual behavior
When using trace: 'retain-on-failure', traces for successful tests appear to only be cleaned up after the entire pipeline run completes. In our pipeline, this causes the dedicated drive to fill up during execution, leading to pipeline failures before all tests can complete.
Additional context
Related to: #38348
Environment
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 AMD Ryzen 7 9800X3D 8-Core Processor
Memory: 1.59 GB / 31.10 GB
Binaries:
Node: 22.19.0 - C:\nvm4w\nodejs\node.EXE
npm: 11.5.2 - C:\nvm4w\nodejs\npm.CMD
IDEs:
VSCode: 1.99.0 - D:\Microsoft VS Code\bin\code.CMD
npmPackages:
@playwright/test: 1.56.1 => 1.56.1
playwright: 1.56.1 => 1.56.1