about to lose patience with stepson?

so hes 3. he pottys in the toilet on his own. he wears underwear and takes himself to the bathroom without any help. but he won't stop pooping in his underwear. ive tried washing them out in the toilet to show him thats where it goes. if you ask him where poop goes he will say "in the potty". i have washed poop underwear 4 times today. and im getting so frusterated im ready to cry. he stays at our house 16 days out of the month and im the one who potty trained him since his mom wouldn't. what do i do!? i dont know how to get him to stop pooping in his underwear. today he even went and hid in the kitchen and smeared it on the floor after he pooped his pants. please please help me stop this 😭