As Dr. J.C. Said,
I have had a problem like this with my 2014 with push button start, and keyless entry.
One time I did not have the little key with me as I just ran up for milk at night.
But I could not open the door and no damn key, no lights etc.
Wife in bed and pissed when she brought her set of keys , and I could used the key to open the door. The truck will start if you use the fob to push the start button.
As soon as I got it started, it would always work as it should afterwards. 1 or 2 years between the events. nether fob would works with the buttons, so not a fob problem.
In the past I have had this happen 1 or 2 times, and you can always start the truck as long as you can open the door , so always keep the key in the fob to open the door.
I have never done any work on it, no water in the back, it sits in the garage 98% of the time.
I do wash it often, but never seen water, last time this happened was about 3 yrs ago.
The fob will work this way if the battery is dead, the book said, I have not tried it with a dead fob battery to check that part out.
Guess I should pull the back seat, but I don't know If I could still do that , may have a check , spring is almost hear., dead gophers on the hiway, so its a good sign.