I have managed to get the "D" to stay in place by cleaning very
thoroughly with degreaser and contact cleaner, and by using
cyanoacrylate sealant

However the gasket is now so
damaged from popping out of place that there is a small weeping
of oil, I'll have to replace the gasket again
I remember when I first built this engine I had the same problem
on the bench, with it dry and no oil at all, not even residue.
However, I was "precise"
with the sealant, not "generous" with it, so that would not have helped.
I think Yamaha have mis-located or mis-sized the solid
reinforcing inside the "D" in the new series of gaskets.
When the gasket is rested in place on the cam case, without the
cover, the "D" sits proud quite a long way. When the cover is tightened,
you can see a LOT of stress on the "D" so that it bulges inward
(concave) not sitting flat like all the new bikes in the showroom.
When I get the replacement gasket, I might take a bit of a grind
off the contact surface of the "D" (maybe 0.5mm or so) and see
how it sits with a little less compression on it.
Then I'll stick it in place REAL good. I WILL BEAT THIS STUPID PROBLEM.
GRR :angry