There's nothing in the rules that says the elephants can't climb trees. Therefore, a moon druid in the shape of an elephant can climb up a tree and hide there.
That's what we have DM's for.
Besides, in a fantasy world? There might very well be a tree big enough and/or an elephant small enough that such a thing seems reasonable.
"Tell me what happened again?"
"Well...you know those magic beans? "
"What? No, what are you talking about?"
"Oh..well, we caught some suspicious types coming out of the sewer tunnels and gave them a fine for trespassing. This foppish fellow talked Joe into accepting these, well, these magic beans instead. Convinced all of us in the squad it was a good deal. Well...Joe planted one of them and it grew into a giant tree."
"A tree...from beans?"
"Hand to god sir."
"This better not be another drop bear story."
"Of course not! I wouldn't be alive to tell you about it if it was! No, this time it was an elephant that fell on him!"
"An elephant. Out of a tree."
"It was a big tree sir. And then it turned into this smelly hobo and he ran off before I could apprehend him."
"...You expect me to believe that?"
"I tell you sir, ever since those adventurers showed up, it's been a madhouse around here."