Yes, your phone needs to be on your person while you complete your session.
Suggested mounting options would be a third-party smartphone bar pad or bar-mounted bag. Older, smaller iPhones like the 5se can even be tucked into a boot.
Note: To receive the highest quality GPS data, your phone should maintain a clear view of the sky in all directions.