At best you loose a lot of flux. If you only go half depth the total loss may not be disastrous but it is still a crazy thing to do.
How bad the loss is depends on the relative geometry and also on the associated magnetic circuit around the magnet. You are creating large leakage paths and you are also introducing the possibility of virtual poles in the rest of the magnetic circuit.
Except for holding and lifting magnets it's crazy,even then you need clearance round the magnet.
Flux