Cats urinate more frequently than they defecate so it is likely that after your cat has urinated, the litter box is now too dirty and repulsive to use again. He goes in the tub because it’s always clean there. Every time your cat soils the tub, you most likely clean it immediately, whereas the litter box may go an entire day before you get around to changing the litter. Given the choice of using a clean tub or dirty litter box, your fastidious cat will naturally use the cleaner area. If you are unable to change the litter box more frequently, get another litter box so at least one of them will be clean enough for him to use. He may continue to soil in the tub out of habit so either place another litter box in the tub, or discourage him from using it altogether by filling the tub with about 1/2 inch of water.
The best way I’ve found to litter train a cat is to at first, place the box very close to where the cat spends most of its time. After he starts using it regularly, keep moving the box until you get it where you want it.