Location or destination?
With an, auf, hinter, in, neben, über, unter, vor, zwischen: use dative for location (wo?), accusative for a destination or change of position (wohin?). Movement within a location can still use dative.
Understand the idea
The two-way prepositions can take dative or accusative. The central distinction is whether the phrase describes an existing location or a destination/change of spatial relationship. Movement by itself is not a reliable shortcut.
Build it step by step
Use dative for where something is or where an activity takes place. Use accusative for the destination of a placement or movement into a new spatial relationship. Compare being on a chair with putting something onto it. Running around inside a park is still an activity located in the park, so that phrase can take dative.
See it in a sentence
Ich gehe in den Park.
Ich jogge in dem Park.
A useful memory aid
Ask whether the prepositional phrase answers where or where to. Then check what the sentence actually means, not merely whether its verb suggests movement.
A common trap
Do not automatically use accusative with laufen or joggen. Movement within one location does not necessarily describe a destination.