Military aircraft don't use ADS-B out a lot of the time. Spy planes are obviously not going to transmit their locations. A civilian plane with an electrical failure might stop transmitting ADS-B out. Being able to identify planes via satellite is a whole separate capability.
[1] In all the planes I've flown, ADS-B is configured to transmit whenever the master electrical switch is turned on, but it can be configured to be turned on and off at will. See this video on a mid-air collision involving an eccentric character who liked to fly with ADS-B out turned off: https://youtu.be/G5y3JiOEnVs?si=rs5gNMurZ9ssUloS. If I recall correctly, he had his ADS-B wired to his nav lights so he could turn it on and off at will.