All 9 speed shimano RDs (road and MTB) will work with Shimano 10 Speed road shifters (except Tiagra) to shift a 10 speed cassette.
9 speed Shimano RDs (road and MTB) will NOT work with Shimano 10 speed MTB shifters to shift a 10 speed cassette.
So, your 9 speed XT RD will work with a 10 speed shifter and cassette IF it is a Shimano ROAD shifter (except Tiagra).
If this is for a flat bar, you need to get a flat bar 10 speed road shifters that is either shimano (but not Tiagra) or made to work with shimano.
And you are in luck because microshift makes exactly that:
https://www.jensonusa.com/Microshift...-Road-Shifters
I use these with an XT 9sp RD to shift a 10 sp cassette. Works perfectly.