It can be a learning opportunity!
We are smart alecks in my house, and with only one child we did not always lock the door. So when daughter would barge in ask what I was doing I'd say
"Pooping.
On the potty.
Like a big kid.
You should try it".
I told my daughter she should use the toilet “like her brothers,” but then had to reconsider. They make an awful mess.