https://a.aliexpress.com/_BSorDx
I haven't tried more extensive tests (e.g. video out) but I don't see any real reason why Apple couldn't make a more official (i.e. USB-C certified) version. As the sister comment says, if it's for power only then it is simpler.
I'd imagine rather than adapters like this, you would plug in a cable that has a magnetic joint somewhere near the end that can 'break' if pulled.
A charger cable, that only does PD, could have a magnetic break in it without issues.
However, as opposed to magsafe there's a tiny dongle that stays in the usb-c port. Also, the magnet is weaker than in the old apple magsafes.
I don't remember ever having problems with the charger popping out when it wasn't supposed to. But I also always used it on a desk, rather than sitting it on my lap.
What I could imagine though, is if the charger itself incorporates MagSafe.