Forgive me for asking this question as an old user. I found the answer. Due to the update of zotero7, the entries are collapsed by default. You need to press "+" to expand them and then delete the associated attachments. My document item is associated with two attachments, and I encountered this problem when one of them needed to be deleted.
When I use +/- Expand/Collapse Collections or Items List, why can I no longer see the affiliation of PDF files as before, but more like a sibling relationship.
Provide a screenshot that shows what you're talking about. But you should start by making sure you can reproduce this in Troubleshooting Mode (Help → "Restart in Troubleshooting Mode…”), which temporarily disables all plugins.
You're saying it's fixed? There've been no changes related to this in Zotero, but glad to hear it's fixed for you now. Be sure to disable plugins if you see it happening again.
For a linked-file PDF, Zotero does not delete the PDF. Use delitem plugin:
https://github.com/redleafnew/delitemwithatt