
Exactly that.
Its mostly common on commercial devices still, but it is defined.
https://www.usb.org/document-library/usb-type-cr-locking-connector-specification
As an example:
https://www.startech.com/en-us/cables/usb31ccslkv1m
Though again, a lot of this could be mitigated with a loop, strain relief, and inserting from above into a port rather than letting gravity pull it down. But it would be nice to see side screw locks be more common with usb-c.
Anything important enough to be secured you probably dont want to involve a magnet for.