Nothing to do but "fix" in in place, using something not 100 % final.
If it was me and since i have it, i would try a little shoe goo.
en.wikipedia.org
I have used it for a while now, waterproofing things ASO - bodies on RC card and i have even used in to temporary hold a ALU frame for 4 X 180 mm fans for my next computer build.
I like to have some around, and find it almost as much as a must have as duct tape and cable ties.
IF ! Your magnetic mount are strong, you could try and put some thin rubber in between the magnets to increase the friction to stop things sliding, a little of a rubber / nitrile glove or something like that.
My rear cameras have been on a neodymium magnet for many years, and it just 1/2 the size ( 10 X 20 mm i think it is ) of the footprint of the cameras mounting surface, it have never moved a mm, but i have put a little sticky on the magnet surface that grip the metal frame of my rear hatch ( left over residue from a sticky pad )
But ! As i recall at first i did not have anything on that part of the magnet and it still stayed in place just fine, and i slam my rear hatch like you would slam one of those.
Maybe your mount are just regular magnets, they are considerable weaker than the neodymium magnets.
Maybe your mount are just 1 magnet and a piece of steel.
PPS: Having a assortment of neodymium magnets,,,,, i also find a must have, you can use them as a vice / clamp to hold thin things together while a glue set ASO
A 12 mm round or 10 x 10 x 5 square one, insane good grip, borderline fierce if you have 2 similar magnets together, i would like some 20 x 20 x 10 or so too for larger things, but have to be careful, when these magnets get big they literally become dangerous too.
My immediately in reach stash of magnets, residing on a screw on my table lamp on the computer table.
These little ones, i can not grip them good enough to pull them apart, so when i need one i have to slide if off the stack.
2 of the little magnets, easy "gripping" each other thru my finger, do that with say a 50 x 50 x 20 mm magnets,,,,, and my finger would probably be crushed.
It would at least be painful, these little ones on my finger i can barely feel they are there, if i put one magnet on my forearm just behind the wrist, i can make it flip over by holding another magnet under my lower arm, but they are not strong enough to lock so the bottom ones weight can be carried when i lift my arm from the table.