How many ways are there to put 4 balls in 3 boxes if the balls are not distinguishable but the boxes are?
If the boxes were distinguishable then your solution would be correct. In effect, this is distributing indistinguishable balls (k) into distinguishable boxes (N), forming a combination of size k, taken from a set of size n.
$$\displaystyle \left( {\begin{array}{*{20}c} 4 \\3 \\ \end{array}} \right)\; = \; \dfrac{(4)!}{3!(4-3)!} \; = \;\hspace{5pt} \Text {4 \ ways} \\\$$
When both b***s and boxes are indistinguishable, empty boxes are forbidden, if they were allowed then they are distinguishable, and the above formula would apply.
The reason for this is the mathsgod said so. Mathsgod, please come and verify the veracity of this statement.
These types of questions are not intuitive. Consider your statement: “All the balls and all the boxes are identical . . .” Though it would seem so, this is not the same as indistinguishable in a mathematical sense.
If identical boxes are present at the same time then they are identifiable via their positions in space. Like many hypothetical math questions, it becomes difficult -- sometimes impossible-- to create a real situation where these concepts can be examined. Many math realities exist only in the mathematics and cannot exist in our normal space-time. Torricelli's trumpet is a classic example of this.
This question can exist in normal space but probably not with boxes. An approximation might be to place the boxes behind a frosted glass that distorts their size, shape and position in space. This approximation still falls short. To be true to the question, the boxes cannot exist until the b***s are placed in them. This is why it is a partition question. There are no empty partitions because the balls themselves make the partitions.
As complex as this may seem, it becomes more so when the balls are distinguishable. These are royal ball-busters. Sterling numbers of the second kind are used for these partitions.