I had a customers bike do the very same thing today!
I added a extra head gasket to lower the compression a little & it cleared up the rattling noise about 70%. I didn't want to add a third gasket becausae I was concerned with it lowering the performance.