Simple door catch with using 6, 9 or more pieces of 8x3 mm neodymium magnets. Magnets do not need to be glued.
The wall the magnets touch is only 0.4 mm thick, so I recommend leaving the Arachne wall generator on.
To increase the magnetic force, simply add 3 or more magnets to the part “magnetic catch pt2” (located on the door frame).
You can choose between a thinner version for the door leaf for 3 magnets, or a stronger one for 6 magnets.
Optional: I printed the "magnetic catch pt1.stl" part (the part on the door leaf) from flexible material with Shore 41 D hardness and 100% infill. Because I don't like the sound when two plastic parts snap together, the flexible material eliminates that.