Starting from the 12th generation, Intel has two types of core architecture - performance and energy-efficient. So the system works like an idiot - performance cores work only when focusing. Although they claimed that they have a special Thread Director technology in Windows 11 that manages cores very well but in fact it gives all the performance to the focus windowJ'en connais un qui va faire des bonds...
To solve this problem, you need to run Vs Code (or any other process) as an administrator