Said it before, will doubtless say it many times again... Level 5 self-driving isn't coming until with have AGI.
AGI isn’t required for this. Really good SLAM is.
My guess; the same way they handle every unexpected situation --- slam on the brakes.
The most common accident with self driving vehicles is rear end collisions --- which always gets classified as the human driver's fault.
[1] https://www.understandingai.org/p/human-drivers-are-to-blame...