Hello, freshtry.
Have you applied all the latest updates (not upgrades) for your current version of macOS?
Click Apple Menu > About This Mac > Software Update to see what, if anything, is available.
Also, please make sure that your iPad is running the latest version of iPadOS.
Update your iPhone, iPad or iPod touch - Apple Suport:
https://support.apple.com/en-us/HT204204
If everything is up to date and rebooting the devices hasn't fixed the problem, see if the problem still happens in Safe mode (hold the shift key down at startup). It takes longer to safe boot so be patient.
How to use safe mode on your Mac - Apple Support
Safe mode forces the OS to clear certain caches and logs and do other miscellaneous housekeeping. It's non-destructive to user data so is safe to do. Very often certain weird software behavior is corrected by simply logging in this way as a troubleshooting method. When you're in safe boot, the machine will not be at its best performance, especially with graphics, but that's normal.
Does the problem still happen while in Safe mode?
Exit safe mode by restarting your Mac normally and re-evaluate the issue again after a normal reboot.