I believe you are using link-objects method to create link instances of the attachment. Ideally it should create the link instances. One option here is we can use an ootb activity pxlinkattachmenttocase to create the link instaces.
Is this issue occuring for all the time or sporadically this is happening?
If this happens for every time try to run the tracer with db events while attacing the doc and see whether the link instance is gettig saved into the link-attachments table or not?