Apple's magnetic charging is great, but transporting it with the magic keyboard is a lousy way to do it. I almost dropped mine. With a 3M double sided tape, you should be able to attach this to any cover.
You can purchase the tape here:
https://a.co/d/aFKQprC
The author hasn't provided the model origin yet.