If you are sure that you don't have the file open or currently selected in you finder is there a chance that someone else might?
Can you rename that file in your finder?
If so then you should be able to publish with the original name then delete that renamed file.
Or you could publish with a new name, delete the original and then rename the new file to the old name.
If you have trouble renaming or deleting the original file then either you or someone else has it in use.
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11