This is a well-known problem, escpecially on sport routes that have been bolted on rappel and have a bolt placed every like 2m in a straight line. The only real solution is to ask someone involved in bolting the route or doing the first ascent. Even then, as sports climbing involves free choice of holds, there might be something they have overlooked initially that makes the climb easier.
As general rule of thumb, if the bolts are still reachable and if the moves feel about right for the grading, you are on the route. If your route starts to feel way too easy or you cross over another line of bolts, you are likely off-route.
Another hint can be chalked holds. As long as you are following those, it is likely that you are on the route (assuming routes are not too dense and you already use the neighboring route's holds.
Sometimes guide books give a hint on defined routes, e. g. "climb the crux without the flake on the right hand side"