Something very strange is happening. Blender 5.0 lags terribly in the viewport as soon as I enable rendered shading. Any file behaves this way, regardless of the number of objects in the scene. Versions 4.5 and 4.1 do not behave this way. I decided to try version 5.1 beta. And everything works fine in it with exactly the same scene and Blender settings.
Blender is a mystery that will never be solved 🤡