Be careful

would it be recording in this situation?

not being a smart alec, but really, what are the parameters?
the car was probably not running, and who knows if the ignition was in accesory mode or not
It all depends on your setup. A lot of the better dash cams will automatically record if they detect either an impact and/or motion picked up by the camera. The dash cam I run has impact and motion sensing that is hard wired (always has power) so it monitors the car 24/7. I will say this, do your research when it comes to dash cams. Some of the supposed better names are not the best, IMO.

Oh, another little piece of advice. Once an accident has occurred, make sure your dash cam stays recording and also start recording with your smart phone immediately. You don't have to be recording directly with your phone but putting it in a shirt pocket where it, at minimum, can record audio is a good thing. People will a lot of times admit fault to you at the scene only later to deny everything and blame you when they deal with insurance or the courts.