He wont' always fail.. He will have the odd innings where it comes together (as all players do). However, his avg is 35 for a reason.. More failures than you should put up with in a test match batsmen.
Its worth noting that his only productive period as a test batsman was prior to him becoming established in the white ball teams.
It doesn't seem to me to be rocket science to figure out what's happened - he's adjusted his technique to be looser and more free flowing to enable him to score more quickly in white ball cricket, and this has exposed flaws in his red ball defensive game.
He's never going to be a competent test batsman again unless he gives up the white ball stuff.
and, tbh, I'd rather he didn't. He's clearly an incredible white ball player, whereas he's never going to be anything more than an average red ball batsman, so he should just stick to that.
Same applies to Buttler, Roy, Banton, Hales etc. Just stick to what you're good at - trying to do too many things just makes you crap at everything.