Usually the TAs like these are from low flying aircraft with mode A transponders. Since TCAS measures closing rate, the TA will go away when getting closer, as it only measures the relative speed of the intruder. The greater the difference in altitude, the earlier it goes away because the actual closing rate decreases. You could see the same effect when passing a DME station at altitude, where the DME ground speed decreases a minute or two before the station, depending on your altitude and speed.
As TCAS RAs are based on mode C readouts, mode A equipped threats can never trigger RAs (as it would not know whether to climb or descend when target altitude is unknown). If the TA continues until the white circle on your TA/RA display gets very close to you, then it is time to start worring (albeit a bit late then).
Lookout and ATC help (when avbl) is key here, if IMC and no radar coverage then ... turn the TCAS off
Some older TCAS versions also trigger TAs when in RVSM airspace, as old TCAS assumes 2000 feet separation above FL280. If you are FL340 and opposite traffic is FL350, you could get a TA if using older TCAS software.