The Proximity Hijack
Sidecar is a powerful macOS feature that allows you to use a compatible iPad as a secondary wireless display for your Mac. To make this seamless, Apple designed macOS to automatically detect when your iPad is nearby and unlocked. In some configurations, particularly when both devices are signed into the same iCloud account and on the same Wi-Fi network, simply waking up your iPad while sitting at your desk can prompt macOS to automatically connect and extend its display to the tablet. If you just wanted to use your iPad to check an email or read an ebook, having your Mac suddenly push application windows onto it is highly disruptive.
Disabling the Automatic Sidecar Connection
To stop macOS from automatically connecting to your iPad and triggering the Sidecar display extension, you must disable the automatic AirPlay receiver setting.
Click the Apple Logo in the top-left corner of your Mac’s screen and select System Settings (or System Preferences on older versions). In the left-hand sidebar, click on Displays. If your iPad is currently connected via Sidecar, you will see it listed here. Click on the iPad display to view its specific settings, and look for a button that says Disconnect. To prevent it from happening again automatically in the future, you need to adjust your AirPlay settings. Go back to the main System Settings menu, click on General, and then select AirDrop & Handoff. Look for the setting labeled AirPlay Receiver. While you don’t necessarily need to turn it off completely, you should change the “Allow AirPlay for” setting from “Anyone on the same network” to Current user, or disable it entirely if you never intend to cast to the Mac. More importantly, to stop the Mac pushing out to the iPad, ensure you never click “Connect automatically” when manually selecting the iPad from the Control Center’s display menu.