Your employer is guilty of discrimination against you if they don't provide you with an appropriate dignified place to use the loo. This can be in single-occupancy unisex fully-enclosed rooms (not cubicles) if it's a small scale place with not many loos, but will usually be in single sex rooms.
Rooms with cubicles and shared washing facilities must be single sex.
Your employer is guilty of discrimination against any trans employees if they don't have an appropriate place to use the loo. This generally should be in a single-occupancy unisex fully-enclosed room (not a cubicle) in order to meet their requirement not to be in with their natal sex and the employer's duty to maintain single sex facilities for other employees.
The first action is to check the employer's policy. If they haven't changed their policy since the SC ruling they may still have an official or unofficial policy that anyone can use any loo. That is in breach of the law and they should be held to account for that. You cannot be sacked for upholding your existing rights and that includes the right to dignified facilities when you are needing to take your knickers off.
Buildings that do not have any single-occupancy fully-enclosed rooms can temporarily redefine a cubicle-room as "single occupancy" with a notice outside the main door and a bolt on the inside of the main door, until such time as they can create something more appropriate.
The trans employee absolutely does not havr the right to use wrong-sex facilities. You are not a prop to provide emotional validation to another person without your consent. You are due more dignity than that.
No one questions that it's obviously wrong and an offense when a male invades the privacy of women's facilities using a spycam or peephole. It is no less an invasion to do it by disguise and deception (if anyone even thinks the person in question cones anywhere close to "passing"). The male person's gender is irrelevant, this is about sex not gender and sex doesn't change.
If the policy correctly upholds that facilities are to be used on the basis of sex not gender and a trans employee is incorrectly using the wrong sex facilities rather than a unisex fully enclosed room then that's a disciplinary issue between the employer and that employee