My environment :
Visual Studio Community 2022 Version 17.5.4 and Xamarin 17.5 (Xamarin.android SDK 13.2)
Target platform android 12.1 (Samsung phone)
When I deploy a project to my phone via USB connection, application specific directories are sometimes erased.
This application-specific directories erased are documents directories ContextWrapper.GetExternalFilesDirs(null)[0 or 1].AbsolutePath, ie
Sometimes only files are erased, sometimes directories cache and files are itself erased (I don't use others specific directories).
I am an occasional user of Xamarin. I had never encountered this problem before.