Here is what I found on Nvidia's site about Advanced Optimus:
Display-specific features available on discrete GPU (like NVIDIA® G-SYNC®, higher refresh rates) may not be available on the laptop display even though the discrete GPU can support them
Copying over each displayable surface introduces a performance and latency overhead.
Go there and read the entire solution.
Thank you for your answer.
Judging from your quote this seems to be only the issue with older NVIDIA Optimus version where you couldn't choose the GPU like in case of Advanced Optimus. Everything was always directed through iGPU there. I have an old 2014 Acer which has this Optimus version and it actually doesn't have any of the mentioned issues. There are no stutters there whatsoever.
I did check the rest of the article though and:
"Advanced Optimus allows dynamically switching an internal VESA Embedded DisplayPort (eDP) laptop display panel across different display adapters and hence offering a great battery life, performance and benefits of Gsync and high refresh rate."
This sounds like laptops with MUX switch (like my Legion) actually can use GSync and high refresh rate without problems.
I did turn off FreeSync anyway and GSync isn't available with Hybrid Mode at all, so I don't think it's this issue. I was thinking about the "high refresh rate" being the issue maybe, but:
1. The first issue occurs even when plugged in, with no second display. With GSync/FreeSync off.
2. The second issue is not GPU dependent and can happen on both AMD and NVIDIA, and with CTRL+SHIFT+B can be moved from one GPU to another. So this doesn't sound like a hardware/technology limitation either. More like OS/Driver issue.
An interesting thing is said here:
"The display screen may appear to be frozen for a few seconds when the display is switched between integrated and discrete GPUs (may take longer on Windows 11)."
This sounds like the first issue I have when using Windows 11 UI elements, so I think it further proves that for some reason Windows 11 triggers dGPU when using parts of UI.