Shimano says they should be as close as possible without touching. You only said they might be rubbing. Did you ever find out? Here is what Shimano said for my rear DR on a past bike...
Adjusting the B-tension adjust bolt
Mount the chain on the smallest chainring and the largest sprocket, and turn the crank arm backward. Turn the B-tension adjust bolt to adjust the guide pulley to be as close to the sprocket as possible but not so close that it touches. Next, set the chain to the smallest sprocket and repeat the above to make sure that the pulley does not touch the sprocket.
page 14
https://si.shimano.com/en/pdfs/dm/RD...003-09-ENG.pdf