The Prophet ﷺ used to pray while his granddaughter was on his shoulder. On one occasion he carried Umama while praying, and whenever he wanted to bow or prostrate he would set her down, then pick her up again when he stood.
حدثنا وكيع عن أبي العميس حدثنا عامر بن عبد الله بن الزبير عن الزرقي يقال له عمرو بن سليم
أن النبي ﷺ كان يصلي وابنته على عاتقه وقال مرة حمل أمامة وهو يصلي وكان إذا أراد أن يركع أو يسجد وضعها فإذا قام أخذها
The chain of transmission is sahih. Abu Umays is Utba bin Abd Allah al-Masudi, one of the well-known trustworthy narrators, and his hadith is found in the collections of the group. The hadith was mentioned previously at 22544.