Certainly sounds like he's stressed about not going out. I'd maybe add another tray in a different location plus think about plugging in some Feliway diffusers for the time being.

But ultimately, if not going out is stressing him and causing cystitis, you might have to think about letting him come and go as before.