Answered by Ustadh Tabraze Azam
Question: Assalamu aleykum.
Is my prayer valid if I move beside my child who is in front of me or if I move him a bit so I can for example continue my prostration?
Answer: Wa alaikum assalam wa rahmatullahi wa barakatuh,
I pray that you are in the best of health and faith, insha’Allah.
Excessive action is that by which an onlooker looking from afar, who didn’t know you were praying, would think that you were not in prayer. [Shurunbulali, Maraqi al-Falah]
The situations you’ve described do not fall under this definition, and thus do not invalidate the prayer.
And Allah alone gives success.
Checked & Approved by Shaykh Faraz Rabbani.