It is annoying, but the Mini 4 Pro is only equipped with optical sensors, which are basically cameras that rely on video input and algorithms to tell whether there's obstacles ahead, and at night they're useless. DJI would actually warn you that the obstacle avoiding feature into going to function when the surroundings get dark and a message would pop up on the controller(at least on mine), so it's not an issue with the drone.