I'm with you. There is no setting. This drives me nuts on my motorcycle. I pick the nice scenic route, put the device into my pocket, (Bluetooth speakers in helmet) and then halfway through my very zen ride, this happens and I can do nothing but rage internally and try to remember to pull over and fix it, only for it to happen again 30 minutes later.
Google: you know I'm on a motorcycle. I see that on my location timeline page and marvel at the sophistication of technology. Please for the love of god if you won't give us a simple toggle for this behavior (I know you won't) just take the technology a tiny step farther and don't do this opt-out route changing thing if you detect I'm on a motorcycle.