How do I forcibly unpair my Magic Keyboard from my Mac, so that I can pair it with my iPad?
No - the pairing record on the Mac will remain until you remove it from that Mac. It's a sleeping dog situation when the Mac isn't nearby.

You can get a factory wipe of Apple's Bluetooth keyboards using this debug feature in macOS: - https://apple.stackexchange.com/a/15291/5472


Hold shift and option (only) when clicking on the Bluetooth icon in the menu bar of the Mac
Select Factory Reset for each device you wish to reset