Reproduction steps:
1. Create a new project
2. Via the navigation bar open Edit → Preferences → Package Manager
3. Under “Cache Management” in the “My Assets” section, click on the drop-down menu on the right and select Change Location
4. Navigate to “C:\packages” and click on the “Select Folder” button
5. Via navigation bar open Window → Package Manager
6. Change packages to “My Assets” and click on the refresh button
7. In an internet browser, navigate to the Unity Asset Store and open the page of an asset that can be updated
8. Press on the “Open in Unity” button
9. Download the asset
10. Repeat steps 2 and 3, but instead of changing location, select “Show in Explorer”
11. In File Explorer navigate further through generated folders from downloading the asset
12. Replace the visible asset with the outdated one
13. Press on the refresh button in Package Manager
14. Repeat step 7
15. In Package Manager select the outdated asset and click on the Update button
16. Observe the asset files in File Explorer
Expected result: Package is updated
Actual result: Package is deleted
Reproducible with: 2021.3.16f1, 2022.2.3f1, 2023.1.0b1
Not reproducible with: 2020.3.44f1 (no update button)
Reproducible on: Windows 10
Note: To reproduce this bug in versions before 2022, cache locations need to be changed in 2022+ versions.