Lots of threads about this. Sometimes the factory gasket will crumble and loosen the bolts. Switch to a quality gasket is step one for me. Then I use grade 8 SHCS and split washer, drill the heads and safety wire. Also use a small amount of blue loctite on bolts and Permatex adhesive sealant on both sides of the gasket. If that comes off there's no hope but so far so good.
its simple........this has been a problem for ages and dissected and cured on this forum many times.......torque to 18lbft pounds......dyno in the normal way, re-torque when hot on the dyno.......let the engine cool down till cold.....re-torque again.......job done, they will not fall out.
The problem is the gasket experiences what is termed as "compression-set" whereby it relaxes after the first heat cycle, the net result is the side cover bolts then loosen off, I see it loads in the UK from established engine builders who should know better, it wrecks a track and dumps oil everywhere........using some blue Loctite 243 during the process above adds another level of security.