I had the exact same problem as you and you're in luck. I bet i know what the problem is........ I found a thread by pure accident after TWO YEARS of this issue. Tried everything that everyone suggested with normalizing and removing the negative battery connection overnight and nothing worked. I was close to taking it to the local Toyota mechanic to get it fixed, but I have built high performance vehicles, rally cars, resurrected junk yard cars, etc. and I will be damned if I was going to run to a mechanic with my tail between my legs on this.
So, I decided to try one more time and I took the hatch apart again. I looked at everything and came up short. I was pissed and in desperation I googled one more time and found a thread that I had never seen before. I cant even find it now, its like it was meant to be found and just disappear....... Weird.
Anyway, here is what the thread said........ Someone had the exact same issues you have and he tried everything, even swapping the rear body ECM. NOTHING! So he had a wiring diagram by chance an he noticed that the blue connector that goes into the body ecu mounted in the tailgate is supposed to be receiving 12 volts on the blue wire and also 12 volts on the blue/red wire with the ignition off. The blue wire was putting out the 12 volts, but the blue/red was 0 volts. He pulled the boot between the body of the 4Runner and the hatch up at the top of the hatch opening. It is the one on the left side when you open the hatch. He pulled the boot back and exposed the wires and there you can find the blue/red wire. He stuck the multi-meter probe in the wire and low and behold, 12 volts with the ignition off!
So I followed this and I tested the blue connector on my rig and the blue/red wire was metering 0 volts with the solid blue wire at 12 volts. I probed the wire up top and I had 12 volts. So I took the plate that holds the body ECM to the rear hatch off and after giving a little play on the wire loom up top of the hatch, I was able to pull the wire harness out a little further. This is when I noticed that the electrical tape wrap was all loose and unraveling. I unwrapped the tape and saw that the blue/red wire was kind of crushed/melted but the other wires were ok. I probed it at this point for continuity to the plug and continuity was good. On the other side of the break in the wire, I was probing 12 volts. I cut the wire and soldered in a new length of wire as a patch, about 3 inches, and heat shrunk some tube around the whole thing. Then i re-wrapped with tape. Checked the red/blue at the connector and had 12 volts! I was beyond excited at this point. Put the tailgate back together and HOLY SHHHHHHHHHHHHIIIIIIIIIP, it worked!!!!!! Key fob opened the window. Tailgate opened without the key on in the ignition, wiper and defrost work without rolling window down and then back up, auto up and down stays memorized and no more weird alarm operation after open and closing gate with key on!!!!!!
Now, I cant say yours will be that easy, but if you want to try something quick I would probe the power wires to the body ECM in the hatch. I can almost guarantee that is your problem. Hopefully you will not have to replace the wire way up in the hatch itself because you will have to fish it out. Yikes!
What it looks like happens here is that either the window or something in the hatch rubs the harness and eventually water gets into the tape causing it to unravel. The wire either gets pinched or rubs right around the base of the window (in my case) and eventually it wears a hole. The window gets water drainage past the seals and it drips down the harness. The wires become oxidized and corrode and break inside the wire itself. I came to this conclusion because once the wire was cut the copper was very oxidized like old pennies. This is just my theory but it seems like the probable cause.
I hope this helps you because it made me beyond happy. It cost me about an hour of my time and $0 to fix. I would have NEVER figured this out if it wasn't for that thread I found and I vow to help others with this problem because it drove me nuts for WAY to long.
Good luck and cheers,
Adam