こうえんをさんぽします。
Why in this sentence do we use を and not で。
For the case of 散歩, both are grammatical but with a slightly different meaning.
https://youtu.be/5zpAze8KPtw?t=368
As mentioned in the video, while 通ります cannot use で since it only carries the "across" meaning, 散歩 can use either because in the 'exercise' context it can have the meaning of "circling inside the park".
こうえんでさんぽします。
.