I had the same Problem. After a very long time of research and trying to find a solution, I came to 3 solutions. I believe the reason why attachments reappear is because if messages in iCloud are also enabled on other Apple device, such as a MacBook. However, I suspect that if I delete pictures in a conversation in Messages on my iPhone and then wait, my Mac may start syncing messages before my iPhone does. When my iPhone eventually syncs, it retrieves the Messages status from iCloud, where the latest one is the status from the Mac. However, all the images from the Mac remain in their current state, despite my having deleted them on my iPhone. Consequently, the images that were actually deleted reappear on the iPhone.
Solution 1
One option is to delete the entire chat and then permanently remove it from the recently deleted section. However, many users may not want to delete the entire chat just to get rid of attachments.
To achieve this, follow these steps: Open Messages → tap on edit at the top left → tap on show recently deleted → select the conversations containing messages you want to permanently delete → tap on delete.
Solution 2
Another method to delete iMessage attachments is by adjusting the message retention settings. However, this may not be the ideal solution for those who wish to keep their chats for a longer duration.
To achieve this, follow these steps: Open Settings → Messages → set to keep messages for 30 days or 1 year instead of unlimited.
Solution 3
The last and best method for me was to manually sync messages, then manually delete all attachments and then manually sync messages again. Using this solution I was able to reduce my message iCloud storage from 500mb to 90mb.
To achieve this, follow these steps:
An all Apple Devices: Go to settings app → click on your name → click on iCloud → click on show all→ click on messages in iCloud→ click on sync now.
On one device (e.g. iPhone): Open messages → select a conversation → click on the person's name → scroll down → click on show more for images or alternatively for files → click on select → choose all the pictures you want to delete → click on delete→ go back to the overview of all conversations → tap on edit in the top left → then tap on recently deleted → select the conversations → tap delete → now navigate from the messages app to the general settings app → click on your name → click on iCloud → click on show all→ click on messages in iCloud→ click on sync now.
On all other Apple Devices:
Go to settings app → click on your name → click on iCloud → click on show all→ click on messages in iCloud→ click on sync now.