How can I solve this bottleneck?

I occasionally experience severe lag, so I tried profiling, but I can’t pinpoint the cause.
I’m pretty sure it’s a CPU bottleneck since I’m doing physics calculations. It’s all in WaitForTasks, and it’s happening inside an EngineLoop and I don’t know what’s causing this.
Everything else is completely clean and this is the reason for almost everything.

All actor and component ticks are disabled and I’m simulating around 100 objects at a time. Only the object being simulated has CCD enabled, but the simulation time is only a few seconds. Apart from some extreme localized lag, performance generally doesn’t degrade that much.

I don’t know what task is being waited for and what is looping that is causing this lag. How can I find out the cause?

Can you show the Callees? Which is the lowest callee with a “flame” next to it?

Have you tried the command Stat Unit to see if it’s actually a CPU bottleneck or not?

Is this it? I’m not very experienced so I’m not sure if this is correct, but it seems like there’s a problem with the UI. Is it possible for the UI to process so slowly?

I checked the stats unit and found there was a significant slowdown in Frame and Game. No abnormalities were found in the GPU.