I used 1/2" brass nipples out of the tile for this shower bar.
You may have a tough time fitting a shutoff behind that.
They do make 1/2" IP by 1/2" IP shutoffs.
It may be a good idea to run 3/4" PEX and then reduce down at the wall.
This one had 1/2" copper all the way, which is larger than 1/2" PEX.