
I had this exact problem with a slim TPU case that claimed MagSafe compatible. the puck kept creeping off my phone on the nightstand, but the moment I took the case off it clicked firmly and stayed, which told me the case lacked the ring magnets a true MagSafe case uses to keep alignment.
I tried re-positioning, a cheaper pad, even a stick-on ring, and it was still finicky. What finally worked was getting a real MagSafe case and switching to Apple MagSafe Charger. That like, charger has proper alignment magnets and does 15W when centered, so teh hold is stronger and it stopped sliding. Bare phone works perfectly with it, and with a true MagSafe case it is just as reliable.