The new 12.9-inch iPad Pro is 0.5mm thicker than its predecessor. That extra thickness could cause the iPad screen to press on the keyboard a bit too tight. However, an older Magic Keyboard could still work with the new iPad Pro.
https://www.notebookcheck.net/12-9-inch-iPad-Pro-could-have-compatibility-issues-with-previous-generation-Magic-Keyboards.534543.0.html