macOS has significantly enhanced security and privacy protection since macOS Mojave. The system may require authorization when using Remote Mouse or a specific feature for the first time, which is similar to how you authorize an app on your iPhone. Without proper authorization, Remote Mouse will not be able to work properly.
The first time to use Remote Mouse after connecting to the Mac, you will be prompted to grant access. Choose “Open System Preferences” and add Remote Mouse to Accessiblity.
If you did not authorize properly in the above steps, you need to do it manually. Go to Mac System Preferences > Security & Privacy > Privacy > Accessibility.
Click the lock icon in the lower left corner and enter your Mac password to unlock it.
Click the plus sign and add Remote Mouse to the whitelist.
Click the lock icon again to prevent further changes (optional).
There’s no need to manually add Remote Mouse to Automation, as it will be requested automatically by the system when needed.