Here in the US, there is a new wrinkle that was added back in July of 2019
14 CFR 91. 225 (f) Each person operating an aircraft equipped with ADS-B Out must operate this equipment in the transmit mode at all times unless—
(1) Otherwise authorized by the FAA when the aircraft is performing a sensitive government mission for national defense, homeland security, intelligence or law enforcement purposes and transmitting would compromise the operations security of the mission or pose a safety risk to the aircraft, crew, or people and property in the air or on the ground;
So some can turn off the ADS-B out.