This is a bug I've just found and reported to Odoo (link here)
Until Odoo will fix this, I've just applied a custom fix on my model in the create method like:
@api.model_create_multi
def create(self, vals_list):
recs = super().create(vals_list)
for rec in recs:
rec.attachment_ids.update({
'res_model': self._name,
'res_id': rec.id,
})
return recs
You can retroactively fix existing records in the same manner through a similar script
Hope it helps ;)