Is it possible to disable WiFi Direct on Samsung devices?

My neighbors basically know if I am home or not because their WiFi devices detect my Samsung phone when it is in range of their devices due WiFi Direct advertising itself. I do not want to advertise my presence via WiFi Direct. How can I disable it? It uses P2P technology and is not affected by WiFi router settings. Is there not a package I can disable via ADB to disable WiFi Direct on Samsung mobile Android devices?

Just go to Settings> Security & Privacy> Location access > Advanced settings > Wi-Fi scanning. stop the wifi scanning in your phone, your phone stops detecting close wifi connection.
Hope it’s work for you.

There is a phone visibility option in the notifications panel. If you don’t see it you can add by press the 3 dots. You can also tell Bixby to turn it off.