I did that once in a new home that I had built.
The tile job lasted about 30 days, then I had to go back and tear it out to put in a solid wall and a door that swung in on hinges. I took out the pocket door.
Never again. Pocket door framing is very flexible and the tile won't be supported.
Sometimes you learn the hard way, but you don't have to in this case if my misfortune decades ago is any help to you.
A pocket door frame was never intended to be used for backing tile in a shower.