Low FPS for some reasons

Summary

For some reasons Unreal Engine becomes very laggy when I maximize it. But when I simply stretch it to fill the screen it works normal. When I maximize the window the program works very laggy, then somehow fps rises to normal level and then when I do something (for instance open content browser) it drops again and vice versa. My specs are: R5 5600, RX6800XT, 16gb RAM, SSD. Processor, and memory load are normal

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Stability

Steps to Reproduce

Open Unreal Engine. If it opens in windowed mode, maximize it.

Expected Result

FPS should be normal at 140 fps.

Observed Result

FPS is around 30 - 50, but very very laggy

Platform(s)

PC