Buttler may not be the best keeper in the world but he has improved immeasurably since he came into the side. He has far too much natural talent not to succeed in my opinion. His temperament is there, he's proved that in limited overs cricket.
You've seen what happened to Ben Stokes. His numbers were average, arguably still are, but he has produced moments only a few other cricketers in the world can. Who else could score 250 odd like he did? Buttler is one of these players.
Stokes was dropped, Root was dropped. They both came back as they were both young, extremely talented high class players. Buttler is the same.
There's plenty of players with bucketloads of natural talent that couldn't hack it in the test arena. Buttler wouldn't be the first or last and whilst I agree that he shouldn't be written off as a test player he's got an awful lot of issues to work at. Even then, if he was a great gloveman you could make the argument that he should be playing over Bairstow as a virtue of that (especially as England have proper batsmen all the way down to 8), but he isn't, you're right to say he's improved since he has been in the test side, but I'm not even sure he's better than Bairstow let alone significantly better to get in on the merits of his ability as a keeper.
I'm not sure Buttler's proved much in ODI cricket, other than he's a very good ODI hitter, and I certainly don't see anything that suggests, right now, that he's got the 'temperament' for Test cricket in his ODI game. He's a fairly poor leaver of the ball, weak against spin (in the test arena, not so much shorter forms), vulnerable around the off stump, to the moving ball, and has a fairly poor defensive technique. I'm not saying he can't solve those problems, in fact I would back his ability to do that, just that the arena for him to work on those issues is in the County Championship with Lancashire not in Test cricket with England.
Stokes are Root are different, firstly I'm not even certain Stokes was dropped from the Test side, but at any rate scored a hundred and took a 6fer in an otherwise disastrous tour of Aus and secondly Root was incredibly harshly done by to get dropped averaging 36 with 2 hundreds (including 180 vs Aus opening the batting) despite being shuffled around the order more times than was fair to him. Even in the context of that tour his 27 average with a highscore of eighty odd wasn't awful. The hype for both of them has largely been based on their performances in the test team.