Sidecar not working with Ipad Pro 2018, Macbook Pro 2016 It only works if I use wired connection, however over the WiFi it does not.

My Macbook Pro 2016 does not recognize my Ipad which is 5 centimeters away. 
Both devices are on the same Wifi network, and both have Bluetooth enabled. Both devices are logged into iCloud with the same AppleID. Both devices have two-factor authentication enabled.


  Why could it be that I cannot connect wirelessly?
To use Sidecar wirelessly, place your iPad to the left or right of your Mac. Then click on the AirPlay icon in your menu bar.

If you have an AirPlay icon, you'll see Connect to in its dropdown menu, with the name of your iPad next to it. Click on that, and you're done.

Depending on how your Mac is set up and whether you've ever used AirPlay before, you may not see the icon, though.

If you don't, go to any open Finder window. Press and hold on the green traffic light icon. You'll see a new dropdown menu that includes options to rearrange the window on the screen —or to Move to your iPad. Do that, and Sidecar is working.

Also, having done this, you'll now have the AirPlay icon in your Mac menu bar and from now on can use it to connect and disconnect to this iPad.

https://support.apple.com/en-us/HT210380

https://www.apple.com/macos/catalina/docs/Sidecar_Tech_Brief_Oct_2019.pdf