Sometimes, when movement takes place in one location, you’ll want to use を[o] instead.
✅ 道を歩く時は、車に気をつけてね。
Michi o aruku toki wa ki o tsukete ne.
Be careful of cars when you walk on the road, okay?
→ True, there is only one location, but here there is movement too.❌ 道で歩く時は、車に気をつけてね。
Michi de aruku toki wa ki o tsukete ne.

