LIS3MDL runs non-stable
I would make sure the power isn't dropping out at any point. I'm also not liking that long trace to ground, could be the source of common mode noise. Better to put a via on ground next to the chip, otherwise you have a lot of parasitic inductance.
From my estimation of about 20mm of copper this equates to ~20nH of inductance, which could be causing the ground to bounce. If you can, take a differential measurement on that ground trace and make sure there is little or no voltage on it.