In that context I think で is correct. で is used to define the location that an action is performed, while に defines the location that someone or something exists/existed/will exist.
An easy example you’ve probably seen before: 公園で遊びます (Play in the park) vs 公園にいます (Exist in the park).
An example from bunpro which uses に in a similar way is:
病院に行かなくてはいけなかったばかりに、試合に参加できなかった。
(Simply because I had to go to the hospital, I couldn’t participate in the game.)
In this case, the に is denoting the place location that the speaker needed to go to to perform the action, which itself is the act of participating in the game.
In some cases, such as 座る, 立つ, 乗る etc, に is used even if you are using it in a continuous form because the main verb carries an implied “state of being”.
椅子に座ります。
(Sit on the chair)
Tofugu has a decent article on it (as usual)
EDIT: Also, check out this video