This frequently keeps happening to me, not sure if it anyone else has the same issue or experienced.
Open a single app (Ulysses, DT, Craft, iMessage, etc) keyboard works fine.
If you go to split mode, or slide over, Magic Keyboard stops working, becomes unreliable, it’s hit or miss. I remove the keyboard off the iPad several times. Still no luck. It’s annoying that when it reverts to the ‘on-screen’ keyboard, I am able to work in split view and slide over normally.