Exactly this. And I'll share a similar comment. I found myself repeating instructions to my 4 year old ans getting frustrated. I watched a parenting video that suggested getting down on her physical level and gently touching her shoulder to get her attention. The theory being when she is focused on something fun or interesting she literally can't hear me or shift her attention.
It worked the first time and has reduced my own emotional reaction and create much more peace.
And while I won't suggest it will work for everyone or this is a scientific process with sufficient information (but should be explored) I find resources like this useful.