I’ve had good success with incasing magnets with plumbers putty. Knead it to mix then roll it out flat and wrap the magnet. Make sure to work the seams so they are sealed. Work on plastic like a freezer bag to prevent it from sticking to surfaces. You need to move fast since it cures quickly.
Any specific putty?