macOS: Disconnect Wi-Fi without turning it off
You can press and hold the Option key when clicking on the Wi-Fi icon in the menu bar. This way, you'll be presented with the extended menu of options and there find the option to disconnect from the currently connected access point without forgetting it or turning off the Wi-Fi.
Clicking on Wi-Fi menu bar icon normally

Clicking on Wi-Fi menu bar icon while pressing and holding down the Option key

Other services dependant on Wi-Fi availability such as AirDrop would continue to work.
P.S.: Other access points and extended network information blurred.