You’ll Need New Accessories
Alongside the M4 iPad Pro, Apple also unveiled a new Apple Pencil Pro and Magic Keyboard. Those are the only versions of these accessories that can be used with the new iPad Pro.
So, if you’re upgrading from an older iPad Pro and have a second-generation Apple Pencil or Magic Keyboard, you might as well sell those or give them away with your iPad, as they won’t work with the new M4 iPad Pro.
With the Magic Keyboard, it’s likely just a matter of fit. The new iPad Pro is significantly thinner than its predecessor. The new Apple Pencil Pro is a bit more complex; while it looks very similar to the older stylus and still docks on the side, the new camera position has likely changed the magnetic charging dock in such a way that it only works with the new model.