I am having the exact same problem with my HTC One M9.
I used MapMyRide on my HTC One M7 without any problem. After I got my HTC One M9 and used MapMyRide with that phone the GPS tracking always switches off when I switch off the screen. Tried Strava and runtastic road bike as well without...