Probably stating the obvious for most but if your key fob sensitivity has been declining, put a FRESH battery in (Cr2016 3v for factory style key fob).
Youtube instructions.
My key fob was fading over the last few months. I had to be really close to my 4runner & press the lock/unlock button multiple times for it to work. I replaced the battery with an extra I had from a 2 pack I bought from Amazon a while ago but the sensitivity only slightly improved. When I thought about it, I realized the new battery was from the same 2 pack I used the last time I replaced it in 2014. Bought a new battery locally and the key fob sensitivity is back to 100%. Buying batteries online can be hit or miss but I've generally had good luck & 5 years is good with me. Regardless, if the sensitivity doesn't improve after changing the battery, don't automatically assume the battery is no longer a factor.