According to the tafseer of Presidency of Religious Affairs of Turkey, there are 2 kind of prostration: one is in the salat, the other one is more like submitting.
As you know, anyone and anything in this universe has to submit the rules of physics determined by Allah willingly or unwillingly. This subject might be a stone or an atheist, doesn't matter. According to my source, this ayah is talking about the second type of prostration. The example of shadows is supporting that. As you know, the shadows' actions are determined by the rules of light and can't be changed by men.
Have they not considered what things Allah has created? Their shadows incline to the right and to the left, prostrating to Allah , while they are humble. (Surat An-Naĥl 16/48)
This ayah too uses the same example.
Source (Turkish)