Beneficial bacteria is far more resilient than what people think.
First they are protected by a thin but strong membrane, so it takes quite a lot to remove bacteria that has established on surfaces.
Secondary, if bacteria has no food like ammonia for a while, from a few days to a week or two depending, the bacteria simply goes dormant and stays dormant until a source of nutrients or food is present again, they will then ‘wake’ up and become active once more. However if left for too long in their dormant state, depending on conditions, they can actually survive for weeks fairly easily as long as they are not dried out but in water that’s not exposed to extreme cold or heat.
So as you may gather, it takes quite a lot to kill off lots of beneficial bacteria.
Still not worth chancing it too much but for your peace of mind, chances are, the beneficial bacteria will be perfectly fine.