If you dont want to go buy a magnet or have any. I have added small grooves to the lids, rendering the lid to not slide when shaking/moving etc.
The originals design is a 8mm magnet hole. You can see the design by the picture.
Addition is done on Tinkercad.
Still learning Bambu studio, so all settings are left at default parameters. Change if you need to, because i have no idea what to change ¯\_(ツ)_/¯