If all that doesn’t work, you can try feliway diffuser sprays, trying different types of litters and boxes, and using cat attract by Dr Elsey. It’s a litter like powder you sprinkle in their box and cats are attracted to it. If nothing else works, I would keep him isolated in an easy to clean room like the bathroom or in a large dog crate with food, water, litter box etc so that he can easily use his box and get in the habit again. It’s frustrating but worth it! Also, you may have to get rid of the stuff that he keeps peeing on if you can’t get rid of the smell. They will go back to pee on places that smell like pee because they think it’s a bathroom now.I super recommend this book!
He started doing it because of the UTI. Now it's just a bad habit (if you're sure that he's healthy again). He learned to associate the litter box with pain since it hurt every time he peed. Please, please, please read this book and try what it suggests. Super thorough and easy to understand. Also, is he neutered?