I am using flutter's Wallpaper dependency, for my wallpaper application. It doesn't matter which package you use, in Android 12+ when setting the wallpaper, the application is restarted. I was reading and this is because "Material You" was added in version 12 of Android and the application or game automatically restarts. It is not allowed to add any configuration so that this does not happen. You also cannot set any configuration in the AndroidManifest --> android:configChanges.
I have downloaded some applications to test that are in the store of wallpapers. And they don't have this problem for my Android 12 and 13.
I can't find a solution in any post. I don't know if someone could solve it, or maybe someone who knows how to find these solutions better than me.
Thank you very much for your time.