Pooping (standing) in a diaper and pooping (sitting) on a toilet... uses different muscles.... this is per our Pediatrician....
It takes a learning about it... and a comfort level and 'ability'....
Pooping IN a toilet... is often, the last ability to be 'mastered' in potty training. For MANY kids. So, he is not the only one.
But don't 'force' it... because, that alone can cause constipation... and cause the child to "withhold' their poop... which then causes the poop to get harder internally and then it causes "pain" when they do poop.... which then causes them to 'withhold' pooping even more... (this is per a Pediatric Gastroenterologist we has to see for our Daughter at that stage). Then, it becomes an actual physical "pain" to poop, and then physical 'fear' of pooping... and once a child becomes "Constipated"... it takes a long time to get the poop to normalize.
My son is the same age as yours... and he is doing that too.
We don't force him... but he is gradually getting less 'fear' about it and pooping on a toilet....
And yes, 'withholding' poop... CAN and DOES cause physical pain and constipation... and other internal problems. Which you want to avoid.
Just give him encouragement when he does try "his best"... but don't force it/scold/punish for it.
all the best,
Susan