On Nvidia + AMD configurations when changing to dedicated mode - Nvidia dedicated, AMD integrated with the AMD wired up to the main screen - there is screen tearing and glitching because the two devices are not synchronising correctly. To do so PRIME synchronization needs to be setup. See here https://wiki.archlinux.org/title/PRIME#PRIME_synchronization
This can probably be done in the display manager hook.