On the front of the sliding part there should be a small recess at the bottom.
(just barely an outline of the magnet, not big enough to actually put it inside)
So the magnet sits “behind” the control-panel that’s on the front of the device.
Hard to see/notice from the outside, but once you know where it is, it should be easy to reattach the magnet with some strong glue.
Maybe this user that had the same issue took some pictures or can provide further help: