How to reproduce:
1. Open the attached "REPRO-2021.1.23-to-2021.2.2.7z" project
2. In the top menu bar click Repro > Build
3. After compiling repeat the second step
4. Upgrade your Unity version and repeat the reproduction steps
5. Compare build time results
Actual results: build time takes 50-70 seconds
Expected results: build time takes 10-20 seconds
Reproducible with: 2021.2.0b1, 2021.2.19f1 2021.3.4f1, 2022.1.5f1, 2022.2.0a16
Not reproducible with: 2019.4.40f1, 2020.3.36f1, 2021.2.0a21
Note: compare the subsequent ones because the initial builds are irrelevant