As an addition to other answers:
To form a picture of the battlefield situation, the radar system of a stealth aircraft (or any radar for that matter) does not need to transmit all the time. It can blib or burst a signal, or perform a sweep for more resolution, and then hibernate. It can also "listen" to other radar signal sources and echoes and thus image the surroundigs to some extent.
As explained in other answers and especially in the comments, modern warfare is no longer a game of separate units. It is a merged system, and on the NATO side, the "glue" of this matrix is the Link 16 network. Data collected from multiple sources is trasferred via Link 16 and is used to form a very comprehensive and accurate realtime presentation of the battlefield.
The stealth aircraft, or actually any networked battlefield operator has eyes, ears and noses all over the place, they really do not necessarily need to use much of their own. For example, for an F-22 or F-35, information about enemy precense is initially delivered from elsewhere, and they only need to use their own radar to perform a strike, and maybe not even for that. Should the adversary fire the missile in question at them while they were using radar, they can simply switch off the radar transmitter, and they have become invisible. The enemy missile only has their last tx position, and that just won't be of any help.