That would be really hard, even knowing in advance.
I had a hard enough time when my T became a grandmother! But both have a something in common - a little baby coming into their lives who will be loved. When we have mothering issues, something like this is really difficult.
My T has pictures of her granddaughter on her desk in the room where we do therapy. They are hard for me to look at because I think the adorable little girl is so lucky to have my T's love. When I recently changed seats I told T that part of it was so I wouldn't have to look at the pictures of her granddaughter and we talked about that until she asked "You could say 'I wish you loved me like you love your granddaughter'". I couldn't have ever said that and can barely acknowledge to myself that I think it. But I love that she put it out there
It is nice that there is another T for you to see during your T's maternity leave. Still I think that would be hard to do, too. Our T's know us well and that's part of what feels so good about therapy. When my T was going to be out for surgery for a few weeks (it turned out she was only out a week), I shopped for cards to send once a week. Cards that said I missed her. One said "Philosphy lesson for the day: You are not here" and inside it said "Therefore, I am sad" and had a sad little puppy picture I think. Anyway, I didn't shop for them until after the last session and the shopping and planning helped me feel like I'd found a way to stay connected with her until she returned.
I hope you are telling your T how you feel so the two of you can talk a lot about it before her leave begins.