How to reproduce:
1. Open the attached project (Part.zip)
2. In the Project panel navigate to the "Scripts" folder
3. Drag the "Part" script onto any GameObject in the Hierarchy
Expected result: The script is added to the GameObject
Actual result: The editor opens a "Can't add script" window informing that the script could not be attached
Reproducible with: 2022.2.0a5, 2022.2.0b11, 2023.1.0a14
Not reproducible with: 2020.3.40f1, 2021.3.12f1, 2022.1.19f1, 2022.2.0a4
Reproducible on: Windows 10, Ubuntu 20.04
Note: The script being attached has to have a partial class and another script with the same file and class name in another folder