This is done automatically in the Modern search experience. All of the following are excluded people properties in the modern people search : {?{searchTerms} (-"sps-usertype":1 AND -"sps-hidefromaddresslists":1 AND -"sps-recipienttypedetails"=4 AND -"sps-recipienttypedetails"=16 AND -"sps-recipienttypedetails"=32 AND -"sps-recipienttypedetails"=8589934592 AND -"sps-recipienttypedetails"=17179869184 AND -"sps-recipienttypedetails"=34359738368 AND -"sps-recipienttypedetails"=2199023255552) ContentClass=urn:content-class:SPSPeople}
Anyone else finding this not to be the case? With the SPS-HideFromAddressLists set to true my users are automatically excluded from Delve, but the Modern SharePoint people search is still returning them, with no way to tweak the query in order to exclude them.
I asked a question on the Q&A section and am awaiting a solution there
Anybody out there manage to get this working?