I have found the issue for me seems to be in assembly's with multiple sub-assembly's in them, if I go into the sub-assembly and save it as the new version it seems to work ok, I just then have to go into the main one and replace the sub-assembly's with the new ones.
I can confirm this behavior with the large STEP file I tested.
Its main assembly (“01”) contains only one sub-assembly (“02”) with 465 parts.
If I first save the main assembly 01 to a desktop folder using the original long file names, I do
not encounter the bug when I later open sub-assembly 02 and rename all parts manually or via my script to save them in a new folder.
However, the issue appears when I attempt the same operation directly from the top-level assembly (main assembly 01), either immediately after STEP import or after saving it once with the original names.
Maybe this helps narrow down the cause of the issue.
Unfortunately, this is not really a practical workaround. I often need to import large STEP files containing 500+ parts distributed across 10–50 sub-assemblies, and I do not want to manually rename each sub-assembly separately and then replace them again in the main assembly.
In the worst case, the original file names may already be too long to save them in higher-level folder locations due to Windows path length limitations.
EDIT:
The same issue also affects native Alibre designs that use my own designed parts and sub-assemblies.
If I try to rename files manually or via script from the main assembly layer in the “Save As” menu, I again run into the same problems with ghost files and false duplicate entries in the table and can't fix it.