Many cats aren’t going to hold it when the tub is in use, and instead of waiting for the bathtub to be available, they may just use another spot for their bathroom break.
Add a matt or some kind of additional surface that cats can easily grip.
Don’t Close The Shower Curtain Too Much
Being able to leave the shower curtain slightly closed also has the benefit of opening up a lot more litter box options, including an uncovered box, even if you’re dealing with a smaller space.