It's an interesting question.
TLE is used to track whether the satellites are in orbit or not
Not exactly. TLEs are used to predict positions of satellites. The TLE or Two line element is carefully constructed so that a propagator (usually SGP4) can predict positions based on the values contained in the TLE.
As far as deactivated, most TLEs are generated by using observations from radar, and optical telescopes, and don't depend on the satellite being active.
(In deep space, where TLEs are not used and where distances are far beyond the reach of radar, we do rely on the spacecraft being active and rebroadcasting signals sent from Earth. The delay and the doppler shift can be used to determine at least radial distance and speed, combine that with orbital mechanics and a trajectory can be reconstructed.)
TLEs for the earliest spacecraft may have been generated much later (see answers to What was the first proper Two Line Element to be generated?) and they can be generated with epochs (the T=0 datetime inside the TLE where it may be most accurate) in the future as well. (see answers to Can the TLE epoch be listed as in the future? How? and also Is SGP4 propagation necessarily more accurate near the epoch chosen for TLE generation?)
But as the public, we don't really know when the actual measurements of the position and/or speed of the satellites are made, or the "secret sauce" used to cook those measurements into a TLE.
Can the deactivated satellites also be tracked through TLE?
So really noYes but really No. Yes, you can predict positions of satellites even if they are deactivated, but No, the TLE doesn't tell us much at all about the condition or even existence of a satellite. Usually if they keep generating them, the spacecraft is probably there. But it's not a reliable verification of the spacecraft's existence or condition.
Publicly available TLEs are just the tip of the iceberg in terms of satellite data out there. If you pay money and/or have some special clearance, you can get better, more refined data, and if you add GPS receivers to your spacecraft as for example Planet Labs does with their Doves, you can determine data yourself.
Or you can even pay companies to point telescopes at your satellites and measure them for you! See for example answers to Are commercial communications satellites in GEO being constantly monitored by telescopes?