I don’t think you can right now. Maybe bathe them immediately get him out
My son did this for a while. I put a swim diaper on him for the majority and then take it off right before I take him out and wash everything it was covering! It was just a phase for my boy. Only a few weeks.
Is he pooping normally during the day? If not he might be a little constipated and the warm water is doing it’s job helping him pass it.
My son did that. We did dinner, bath, books, bed. Since the dinner was so close to the bath and warn water is known to relax them, he would popp every time. We now moved bath time away from any meal time and pooping has stopped.
If it's the same time every day just sit him on the potty/toliet We do potty every morning and sometimes after meals to catch the predictable poops