Weird window glitch after switching drivers

Hi all
I have a laptop with hybrid graphics running Manjaro Gnome, kernel 5.10. I had nvidia proprietary drivers but because Gnome animations were stuttering often I decided to switch to open source drivers and give wayland a try. Wayland didn’t solve the problem, instead three times in a week the entire pc froze. So I decided to switch back to X11 and proprietary drivers, but now some applications have a weird glitch when I snap them to the screen side using Super + right/left.

I’m new to the forum so I don’t know if this is the best practice but I’ll leave here a link to a short video showing the glitch.

This happens only when doing it with the key combination, and only snapping the windows to the sides, not when doing it by dragging the window to the edge of the screen or maximizing it.
Weirdly, it does not appear with all the applications, it happens with nautilus, gnome terminal, the calculator, gnome control center, the system monitor, pamac gui and gthumb but it doesn’t with firefox, visual studio code, firefox, zoom and transmission.

I tried reinstalling the drivers but it didn’t make a difference.

My inxi -G:
Graphics: Device-1: Intel HD Graphics 530 driver: i915 v: kernel Device-2: NVIDIA GM107M [GeForce GTX 950M] driver: nvidia v: 460.56 Device-3: IMC Networks USB2.0 HD UVC WebCam type: USB driver: uvcvideo Display: x11 server: 1.20.10 driver: loaded: modesetting,nvidia resolution: <missing: xdpyinfo> OpenGL: renderer: Mesa Intel HD Graphics 530 (SKL GT2) v: 4.6 Mesa 20.3.4

Any help would be appreciated.