I was experiencing something very similar to this, but I found a fix (at least for my own case).
Whenever I started studio, it ran fine. It also ran fine in play solo, but if I tested once then the editor became unusably laggy. It was also lagging in the script editor. This started when I built a new PC, but the issue wasn’t hardware, it was just some misconfigured settings (at least changing settings fixed it, it’s possible that other hardware doesn’t experience the issue regardless of the settings). For context my build is:
Ryzen 9 5900x
32 gb ddr4 @ 3600mhz
ROG strix x570-f
Windows 10 Home
The monitor was a VG27A.
I messed with a few settings, and finally found that disabling g-sync for windowed applications fixed it. I’ve had other people anecdotally say that this solved the issue for them as well. If you don’t have g-sync you can try to disable global vertical sync, or freesync if you have it.
To change your g-sync settings, go to the nvidia control panel → Set up G-SYNC → Enable for full screen mode: