Is the power of prayer lost if your mind wanders?
The short answer
No. The more attention we give, the more we pray, but prayer lies in the will: the will to pray is itself a prayer. Deliberately encouraging distractions is wrong, but unwanted distractions don't take away prayer's value.
Prayer lies in the will
The more fully we attend to prayer, the more we are praying. But praying is an act of the will, and the will to pray is a prayer in itself.
Deliberate vs. unwanted
It is wrong to deliberately encourage distractions. Unwanted distractions, though, do not take away the value of prayer.
An example
Mother Teresa's sisters pray the rosary walking down busy streets. They are distracted by navigating, but part of them is still in prayer.