This behavior points less to a defective Magic Keyboard and more to how the iPad is arbitrating power, data lanes, and accessory priority on its single USB-C port. On recent iPad Pro models, attaching certain USB-C accessories can cause the system to renegotiate USB roles. When that happens, the Smart Connector can be temporarily deprioritized, which manifests as the Magic Keyboard being disabled. The fact that it happens even with an unpopulated hub strongly suggests a compatibility or signaling issue rather than raw power draw.
With that said, here are some suggestions you csn try:
- Verify that your iPad is running the latest version of iPadOS, currently 26.2.
- If available, test with a different brand/type of adapter – Prefer a simple USB-C → HDMI adapter with no USB controller or PD passthrough.
- If the Anker hub supports PD passthrough, try one without it. Power role negotiation is a common culprit.
- A slight flex or misalignment between the MKB and iPad can make the Smart Connector more sensitive when the USB-C port is stressed.
- Finally, if available, test with another Magic Keyboard – This helps rule out marginal Smart Connector contacts on the keyboard itself.
If the issue persists across different adapters and cables, this is worth escalating to Apple Support and that is what I would recommend as the next step.